/**
 * WooCommerce Lightweight Variations Card - Modern Lightweight Stylesheet
 * Version: 2.1.0
 * Design: Minimal, Modern, High-Performance
 */

/* ========================================
   RESET & BASE STYLES
======================================== */

.wc-vcard * {
    box-sizing: border-box;
}

.wc-vcard {
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-vcard:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ========================================
   HEADER & TOGGLE BUTTON
======================================== */

.wc-vcard__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    transition: all 0.3s ease;
    gap: 16px;
}

.wc-vcard__header:hover {
    background: linear-gradient(135deg, rgba(0, 115, 170, 0.02) 0%, rgba(0, 115, 170, 0.01) 100%);
}

.wc-vcard__header:active {
    background: linear-gradient(135deg, rgba(0, 115, 170, 0.05) 0%, rgba(0, 115, 170, 0.02) 100%);
}

.wc-vcard__header:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

/* ========================================
   HEADER LEFT SECTION
======================================== */

.wc-vcard__left {
    display: flex;
    gap: 14px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.wc-vcard__icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0073aa 0%, #0059a6 100%);
    border-radius: 12px;
    font-size: 24px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

.wc-vcard:hover .wc-vcard__icon {
    background: linear-gradient(135deg, #0085d1 0%, #0073aa 100%);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.3);
    transform: scale(1.05);
}

.wc-vcard__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wc-vcard__text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.4px;
    line-height: 1.3;
}

.wc-vcard__text span {
    font-size: 13px;
    color: #64748b;
    display: block;
    font-weight: 500;
    line-height: 1.2;
}

/* ========================================
   HEADER ARROW
======================================== */

.wc-vcard__arrow {
    font-size: 18px;
    color: #0073aa;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========================================
   BODY CONTENT
======================================== */

.wc-vcard__body {
    padding: 0 24px 24px 24px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.01), transparent);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   COLLAPSED STATE
======================================== */

.wc-vcard.is-collapsed .wc-vcard__body {
    display: none;
    animation: none;
}

.wc-vcard.is-collapsed .wc-vcard__arrow {
    transform: rotate(-90deg);
}

/* ========================================
   VARIATIONS STYLING
======================================== */

.wc-vcard .variations {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
}

.wc-vcard .variations table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.wc-vcard .variations tr {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
    border: none;
    background: transparent;
    padding: 0;
}

.wc-vcard .variations td {
    padding: 0;
    border: none;
}

.wc-vcard .variations td.label {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.wc-vcard .variations td.label label {
    font-weight: 700;
    color: #1e293b;
}

.wc-vcard .variations td.value {
    flex: 1;
}

/* ========================================
   INPUT STYLES - MODERN & LIGHTWEIGHT
======================================== */

.wc-vcard .variations select,
.wc-vcard .variations input[type="text"],
.wc-vcard .variations input[type="hidden"],
.wc-vcard .variations input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.25s ease;
    font-family: inherit;
    appearance: none;
    box-sizing: border-box;
}

.wc-vcard .variations select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%230073aa' d='M4.5 6L8 10l3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.wc-vcard .variations select:hover,
.wc-vcard .variations input[type="text"]:hover,
.wc-vcard .variations input[type="number"]:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.wc-vcard .variations select:focus,
.wc-vcard .variations input[type="text"]:focus,
.wc-vcard .variations input[type="number"]:focus {
    outline: none;
    border-color: #0073aa;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.08);
}

.wc-vcard .variations select:disabled,
.wc-vcard .variations input[type="text"]:disabled,
.wc-vcard .variations input[type="number"]:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #e2e8f0;
}

/* ========================================
   RESPONSIVE - TABLET
======================================== */

@media (max-width: 768px) {
    .wc-vcard {
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .wc-vcard__header {
        padding: 16px 18px;
        gap: 12px;
    }

    .wc-vcard__body {
        padding: 0 18px 18px 18px;
    }

    .wc-vcard__icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        border-radius: 10px;
    }

    .wc-vcard__text strong {
        font-size: 14px;
    }

    .wc-vcard__text span {
        font-size: 12px;
    }

    .wc-vcard__arrow {
        font-size: 16px;
    }

    .wc-vcard .variations tr {
        grid-template-columns: 100px 1fr;
        gap: 12px;
    }

    .wc-vcard .variations td.label {
        font-size: 13px;
    }

    .wc-vcard .variations select,
    .wc-vcard .variations input[type="text"],
    .wc-vcard .variations input[type="number"] {
        padding: 9px 12px;
        font-size: 14px;
    }

    .wc-vcard .variations select {
        padding-right: 32px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
======================================== */

@media (max-width: 480px) {
    .wc-vcard {
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .wc-vcard__header {
        padding: 14px 14px;
        gap: 10px;
    }

    .wc-vcard__body {
        padding: 0 14px 14px 14px;
    }

    .wc-vcard__left {
        gap: 10px;
    }

    .wc-vcard__icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 8px;
    }

    .wc-vcard__text strong {
        font-size: 13px;
    }

    .wc-vcard__text span {
        font-size: 11px;
    }

    .wc-vcard__arrow {
        font-size: 14px;
    }

    .wc-vcard .variations {
        gap: 14px;
    }

    .wc-vcard .variations tr {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: flex-start;
    }

    .wc-vcard .variations td.label {
        font-size: 13px;
        padding-bottom: 2px;
    }

    .wc-vcard .variations select,
    .wc-vcard .variations input[type="text"],
    .wc-vcard .variations input[type="number"] {
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 8px;
    }

    .wc-vcard .variations select {
        padding-right: 32px;
    }
}

/* ========================================
   DARK MODE
======================================== */

@media (prefers-color-scheme: dark) {
    .wc-vcard {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .wc-vcard:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .wc-vcard__header {
        background: transparent;
    }

    .wc-vcard__header:hover {
        background: linear-gradient(135deg, rgba(0, 115, 170, 0.1) 0%, rgba(0, 115, 170, 0.05) 100%);
    }

    .wc-vcard__icon {
        background: linear-gradient(135deg, #0073aa 0%, #0059a6 100%);
        box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
    }

    .wc-vcard:hover .wc-vcard__icon {
        box-shadow: 0 6px 16px rgba(0, 115, 170, 0.5);
    }

    .wc-vcard__text strong {
        color: #f1f5f9;
    }

    .wc-vcard__text span {
        color: #cbd5e1;
    }

    .wc-vcard__arrow {
        color: #64b5f6;
    }

    .wc-vcard__body {
        border-top-color: #334155;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent);
    }

    .wc-vcard .variations td.label {
        color: #f1f5f9;
    }

    .wc-vcard .variations select,
    .wc-vcard .variations input[type="text"],
    .wc-vcard .variations input[type="number"] {
        background-color: #0f172a;
        color: #f1f5f9;
        border-color: #334155;
    }

    .wc-vcard .variations select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2364b5f6' d='M4.5 6L8 10l3.5-4z'/%3E%3C/svg%3E");
    }

    .wc-vcard .variations select:hover,
    .wc-vcard .variations input[type="text"]:hover,
    .wc-vcard .variations input[type="number"]:hover {
        border-color: #475569;
        background-color: #1e293b;
    }

    .wc-vcard .variations select:focus,
    .wc-vcard .variations input[type="text"]:focus,
    .wc-vcard .variations input[type="number"]:focus {
        border-color: #0073aa;
        background-color: #0f172a;
        box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2);
    }

    .wc-vcard .variations select:disabled,
    .wc-vcard .variations input[type="text"]:disabled,
    .wc-vcard .variations input[type="number"]:disabled {
        background-color: #1e293b;
        color: #64748b;
        border-color: #334155;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {
    .wc-vcard,
    .wc-vcard__header,
    .wc-vcard__body,
    .wc-vcard__arrow,
    .wc-vcard__icon,
    .wc-vcard .variations select,
    .wc-vcard .variations input[type="text"],
    .wc-vcard .variations input[type="number"] {
        transition: none;
        animation: none;
        transform: none;
    }
}

@media (prefers-contrast: more) {
    .wc-vcard {
        border: 2px solid #1e293b;
    }

    .wc-vcard__text strong {
        font-weight: 900;
    }

    .wc-vcard .variations select,
    .wc-vcard .variations input[type="text"],
    .wc-vcard .variations input[type="number"] {
        border-width: 2px;
        font-weight: 600;
    }
}