/**
 * DRAK - Modal Tabeli Rozmiarów
 * Globalny modal dostępny z footera i strony produktu
 */

/* ========== MODAL: TABELA ROZMIARÓW ========== */

.drak-size-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drak-size-modal.active {
    opacity: 1;
    visibility: visible;
}

.drak-size-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.drak-size-modal-content {
    position: relative;
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 16px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 100px rgba(220, 38, 38, 0.1);
}

.drak-size-modal.active .drak-size-modal-content {
    transform: translateY(0);
}

/* Scrollbar */
.drak-size-modal-content::-webkit-scrollbar {
    width: 6px;
}

.drak-size-modal-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.drak-size-modal-content::-webkit-scrollbar-thumb {
    background: var(--draki-red);
    border-radius: 3px;
}

/* Przycisk zamknij */
.drak-size-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    z-index: 10;
}

.drak-size-modal-close:hover {
    color: var(--draki-red);
    transform: rotate(90deg);
}

/* Tytuł */
.drak-size-modal-title {
    font-family: 'Russo One', sans-serif;
    font-size: 28px;
    letter-spacing: 3px;
    color: #ffffff;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.drak-size-modal-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--draki-red);
}

/* ========== ZAKŁADKI ========== */

.drak-size-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drak-size-tab {
    font-family: 'Russo One', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.drak-size-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.drak-size-tab.active {
    color: var(--draki-red);
}

.drak-size-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--draki-red);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.drak-size-tab.active::after {
    transform: scaleX(1);
}

/* ========== ZAWARTOŚĆ ZAKŁADKI ========== */

.drak-size-tab-content {
    display: none;
}

.drak-size-tab-content.active {
    display: block;
    animation: sizeModalFadeIn 0.3s ease;
}

@keyframes sizeModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== INFO O JEDNOSTCE ========== */

.drak-size-unit-info {
    font-family: 'Exo 2', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    margin: 0 0 15px 0;
}

/* ========== TABELA ========== */

.drak-size-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.drak-size-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Exo 2', sans-serif;
}

.drak-size-table th,
.drak-size-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drak-size-table th {
    font-family: 'Russo One', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    color: var(--draki-red);
    background: rgba(220, 38, 38, 0.1);
}

.drak-size-table td {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.drak-size-table .drak-size-label {
    text-align: left;
    font-weight: 500;
    color: var(--draki-red);
    background: rgba(255, 255, 255, 0.03);
}

.drak-size-table tbody tr:hover {
    background: rgba(220, 38, 38, 0.05);
}

/* ========== NOTATKA ========== */

.drak-size-note {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 25px;
}

.drak-size-note h4 {
    font-family: 'Russo One', sans-serif;
    font-size: 18px;
    color: var(--draki-red);
    margin: 0 0 12px 0;
    letter-spacing: 1px;
}

.drak-size-note p {
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ========== JAK SIĘ ZMIERZYĆ ========== */

.drak-measure-guide {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}

.drak-measure-image {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drak-body-svg {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.drak-measure-instructions {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.drak-measure-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.drak-measure-letter {
    font-family: 'Russo One', sans-serif;
    font-size: 18px;
    color: #0a0a0a;
    background: var(--draki-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drak-measure-text h4 {
    font-family: 'Russo One', sans-serif;
    font-size: 16px;
    color: var(--draki-red) !important;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.drak-measure-text p {
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ========== MODAL RESPONSIVE ========== */

@media (max-width: 768px) {
    .drak-measure-text h4 {
        color: var(--draki-red) !important;
    }
    .drak-size-modal-content {
        padding: 25px 20px;
        max-height: 95vh;
    }

    .drak-size-modal-title {
        font-size: 22px;
        padding-right: 40px;
    }

    .drak-size-tabs {
        flex-direction: column;
        gap: 0;
    }

    .drak-size-tab {
        padding: 12px 15px;
        font-size: 13px;
    }

    .drak-size-table th,
    .drak-size-table td {
        padding: 12px 10px;
        font-size: 12px;
    }

    .drak-size-table .drak-size-label {
        font-size: 11px;
        min-width: 100px;
    }

    .drak-measure-guide {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .drak-measure-image {
        max-width: 200px;
        margin: 0 auto;
    }

    .drak-measure-item {
        gap: 15px;
    }

    .drak-measure-letter {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .drak-measure-text h4 {
        font-size: 14px;
    }

    .drak-measure-text p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .drak-size-table-wrapper {
        margin: 0 -10px 30px;
    }

    .drak-size-table th,
    .drak-size-table td {
        padding: 10px 8px;
        font-size: 11px;
    }
}
