/**
 * KB Size Chart - Frontend CSS
 */

/* Container */
.kbsc-size-chart-container {
    margin: 20px 0;
}

/* Trigger Button */
.kbsc-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kbsc-trigger-btn:hover {
    background-color: #555;
    color: #fff;
}

.kbsc-trigger-btn .material-icons {
    font-size: 20px;
}

/* Popup Overlay */
.kbsc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: kbscFadeIn 0.3s ease;
}

@keyframes kbscFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Popup Modal */
.kbsc-popup-modal {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: kbscSlideIn 0.3s ease;
}

@keyframes kbscSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.kbsc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #333;
    color: #fff;
}

.kbsc-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbsc-popup-title .material-icons {
    font-size: 24px;
}

.kbsc-popup-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.kbsc-popup-close:hover {
    opacity: 1;
}

.kbsc-popup-close .material-icons {
    font-size: 24px;
}

.kbsc-popup-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Unit Info */
.kbsc-unit-info {
    margin-bottom: 15px;
}

.kbsc-unit-info .badge {
    background-color: #6c757d;
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Inline Mode */
.kbsc-inline-mode .kbsc-inline-wrapper {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.kbsc-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #333;
    color: #fff;
}

.kbsc-inline-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kbsc-inline-title .material-icons {
    font-size: 20px;
}

.kbsc-unit-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Table Wrapper */
.kbsc-table-wrapper {
    overflow-x: auto;
    margin-bottom: 15px;
}

/* Size Chart Table */
.kbsc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.kbsc-table th,
.kbsc-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #ddd;
}

.kbsc-table thead th {
    font-weight: 600;
    white-space: nowrap;
}

.kbsc-table tbody th {
    font-weight: 600;
    white-space: nowrap;
}

.kbsc-table tbody td {
    white-space: nowrap;
}

/* Highlight on hover */
.kbsc-table tbody tr:hover td {
    background-color: rgba(37, 185, 215, 0.1) !important;
}

/* Instructions */
.kbsc-instructions {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #25b9d7;
}

.kbsc-instructions h4,
.kbsc-instructions h5 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.kbsc-instructions p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.kbsc-instructions ul,
.kbsc-instructions ol {
    margin: 10px 0;
    padding-left: 20px;
}

.kbsc-instructions li {
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .kbsc-popup-modal {
        max-width: 100%;
        margin: 10px;
        max-height: calc(100vh - 40px);
    }

    .kbsc-popup-header {
        padding: 15px;
    }

    .kbsc-popup-title {
        font-size: 16px;
    }

    .kbsc-popup-body {
        padding: 15px;
    }

    .kbsc-table th,
    .kbsc-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .kbsc-inline-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .kbsc-trigger-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .kbsc-table {
        font-size: 12px;
    }

    .kbsc-table th,
    .kbsc-table td {
        padding: 6px 8px;
    }
}
