/**
 * Nice Product Variations & Add To Cart Widget Stylesheet
 * Designed to mirror the luxury variation selection cards UI.
 */

.nice-variations-widget-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: inherit;
}

/* Grid Layout for Cards */
.nice-variations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 24px;
    position: relative;
    padding-top: 14px; /* Space for top overlapping badge */
}

/* Base Card Style */
.nice-variation-card {
    position: relative;
    flex: 1 1 220px;
    min-width: 200px;
    background-color: #FFFFFF;
    border: 1.5px solid #EAEEF4;
    border-radius: 20px;
    padding: 24px 26px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    user-select: none;
}

.nice-variation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

/* Overlapping Badge (Most Popular) */
.nice-variation-badge {
    position: absolute;
    top: -14px;
    left: 28px;
    background-color: #F5D061;
    color: #0F3845;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(245, 208, 97, 0.35);
    z-index: 5;
    white-space: nowrap;
}

[dir="rtl"] .nice-variation-badge {
    left: auto;
    right: 28px;
}

/* Card Header (Icon + Title & Subtitle) */
.nice-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Circle Icon */
.nice-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    border: 1.5px solid #0F3845;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F3845;
    transition: all 0.3s ease;
}

.nice-card-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

/* Card Info */
.nice-card-info {
    display: flex;
    flex-direction: column;
}

.nice-card-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #0F3845;
    line-height: 1.25;
    transition: color 0.3s ease;
}

.nice-card-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #64748B;
    margin-top: 4px;
    transition: color 0.3s ease;
}

/* Price */
.nice-card-price {
    font-size: 24px;
    font-weight: 700;
    color: #0F3845;
    margin-top: auto;
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* Selected / Active State Styling */
.nice-variation-card.selected {
    background-color: #0F3845;
    border-color: #0F3845;
    box-shadow: 0 15px 35px rgba(15, 56, 69, 0.25);
}

.nice-variation-card.selected .nice-card-title,
.nice-variation-card.selected .nice-card-price {
    color: #FFFFFF;
}

.nice-variation-card.selected .nice-card-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.nice-variation-card.selected .nice-card-icon {
    border-color: rgba(255, 255, 255, 0.8);
    color: #FFFFFF;
}

/* Actions Row (Quantity & Buttons) */
.nice-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

/* Quantity Selector */
.nice-qty-wrapper {
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 4px 6px;
    height: 48px;
    box-sizing: border-box;
}

.nice-qty-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #0F3845;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.nice-qty-btn:hover {
    background: #E2E8F0;
}

.nice-qty-input {
    width: 44px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #0F3845;
    -moz-appearance: textfield;
}

.nice-qty-input::-webkit-outer-spin-button,
.nice-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons */
.nice-add-to-cart-btn,
.nice-buy-now-btn {
    height: 48px;
    padding: 0 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
}

.nice-add-to-cart-btn {
    background-color: #0F3845;
    color: #FFFFFF;
    flex: 1 1 auto;
}

.nice-add-to-cart-btn:hover {
    background-color: #174d5e;
    transform: translateY(-1px);
}

.nice-buy-now-btn {
    background-color: #F5D061;
    color: #0F3845;
    flex: 1 1 auto;
}

.nice-buy-now-btn:hover {
    background-color: #f7ce50;
    transform: translateY(-1px);
}

/* Loading & Disabled State */
.nice-add-to-cart-btn.loading,
.nice-buy-now-btn.loading {
    opacity: 0.75;
    pointer-events: none;
    position: relative;
}

/* Standard WooCommerce table swatches override class if applied */
.nice-transformed-swatches table.variations {
    display: none !important;
}
