/**
 * Gevents Custom Variations Grid Styles
 * Mobile-first responsive design
 *
 * @package Gevents
 */

/* ==========================================================================
   VARIATIONS WRAPPER
   ========================================================================== */

.gevents-variations-wrapper {
    width: 100%;
    margin: 2rem 0;
}

/* ==========================================================================
   SECTOR CARDS (Modelo Sympla)
   ========================================================================== */

.gevents-variations-sectors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gevents-sector-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gevents-sector-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.08);
}

/* ==========================================================================
   SECTOR HEADER
   ========================================================================== */

.sector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sector-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.sector-count {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ==========================================================================
   VARIATIONS LIST (Rows inside card)
   ========================================================================== */

.sector-variations-list {
    display: flex;
    flex-direction: column;
}

.variation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
    gap: 1rem;
}

.variation-row:last-child {
    border-bottom: none;
}

.variation-row:hover {
    background: #f9fafb;
}

.variation-row.unavailable {
    opacity: 0.5;
    pointer-events: none;
    background: #fafafa;
}

/* ==========================================================================
   VARIATION INFO
   ========================================================================== */

.variation-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.variation-type {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.variation-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

/* ==========================================================================
   VARIATION CONTROLS
   ========================================================================== */

.variation-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #667eea;
    border-radius: 6px;
    background: #ffffff;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.qty-btn:hover:not(:disabled) {
    background: #667eea;
    color: #ffffff;
    transform: scale(1.05);
}

.qty-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
}

.qty-btn svg {
    width: 14px;
    height: 14px;
}

.qty-input {
    width: 45px;
    height: 32px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #1f2937;
    flex-shrink: 0;
}

.qty-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
}

/* Remove spinner from number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* ==========================================================================
   SUMMARY SECTION
   ========================================================================== */

.gevents-variations-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: none;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.summary-total {
    text-align: center;
    margin-bottom: 1rem;
}

.total-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.total-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-align: center;
}

.total-fee {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: center;
}

.summary-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
}

.summary-notice svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   ADD TO CART BUTTON
   ========================================================================== */

.gevents-variations-form {
    width: 100%;
}

.gevents-add-to-cart {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gevents-add-to-cart:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.gevents-add-to-cart:active:not(:disabled) {
    transform: translateY(0);
}

.gevents-add-to-cart:disabled {
/* ==========================================================================
   TABLET BREAKPOINT (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .variation-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .variation-type {
        flex: 1;
        font-size: 1rem;
    }

    .variation-price {
        font-size: 1.25rem;
    }

    .qty-btn {
        width: 34px;
        height: 34px;
    }

    .qty-input {
        width: 50px;
        height: 34px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   DESKTOP BREAKPOINT (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
    .gevents-variations-sectors {
        gap: 1.25rem;
    }

    .gevents-sector-card {
        border-radius: 14px;
    }

    .sector-header {
        padding: 1.25rem 1.5rem;
    }

    .sector-name {
        font-size: 1.25rem;
    }

    .variation-row {
        padding: 1rem 1.5rem;
    }

    .variation-type {
        font-size: 1.0625rem;
    }

    .variation-price {
        font-size: 1.375rem;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
    }

    .qty-input {
        width: 55px;
        height: 36px;
    }

    .gevents-variations-summary {
        padding: 1.5rem;
    }

    .total-value {
        font-size: 2.5rem;
    }

    .total-fee {
        font-size: 1rem;
    }

    .gevents-add-to-cart {
        font-size: 1.125rem;
        padding: 1.125rem 2rem;
    }
}

/* ==========================================================================
   MOBILE BREAKPOINT (< 640px)
   ========================================================================== */

@media (max-width: 640px) {
    .sector-header {
        padding: 0.875rem 1rem;
    }

    .sector-name {
        font-size: 1rem;
    }

    .sector-count {
        font-size: 0.8125rem;
    }

    .variation-row {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .variation-type {
        font-size: 0.875rem;
    }

    .variation-price {
        font-size: 1rem;
    }

    .qty-btn {
        width: 30px;
        height: 30px;
    }

    .qty-input {
        width: 42px;
        height: 30px;
        font-size: 0.875rem;
    }
}
    .gevents-add-to-cart {
        font-size: 1.125rem;
        padding: 1.125rem 2rem;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .gevents-variations-wrapper {
        display: none;
    }
}
