/**
 * WoOrder Plugin Styles for WoOrder-Greek Theme
 *
 * Styles the WoOrder plugin checkout components, product addons,
 * time slots, tipping, and other modules to match the dark Mediterranean aesthetic.
 *
 * @package WoOrder_Greek
 */

/* ==========================================================================
   WoOrder Checkout Wrapper
   ========================================================================== */

.wog-woorder-checkout-wrapper {
    --woorder-primary: var(--wog-color-gold);
    --woorder-accent: var(--wog-color-gold-light);
    --woorder-radius: var(--wog-border-radius);
}

/* ==========================================================================
   Service Type Selector
   ========================================================================== */

.woorder-service-type {
    background-color: var(--wog-color-dark-card);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius-lg);
    padding: var(--wog-space-xl);
    margin-bottom: var(--wog-space-xl);
}

.woorder-service-type__title {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-xl);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-md);
}

.woorder-service-type__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--wog-space-sm);
}

.woorder-service-type__option {
    position: relative;
}

.woorder-service-type__option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.woorder-service-type__option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--wog-space-sm);
    padding: var(--wog-space-lg);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius);
    cursor: pointer;
    transition: all var(--wog-transition-fast);
    text-align: center;
    font-size: var(--wog-text-sm);
    color: var(--wog-color-text-muted);
}

.woorder-service-type__option input:checked + label,
.woorder-service-type__option label:hover {
    border-color: var(--wog-color-gold);
    color: var(--wog-color-gold);
    background-color: rgba(201, 169, 110, 0.05);
}

.woorder-service-type__option input:checked + label {
    background-color: rgba(201, 169, 110, 0.1);
    box-shadow: 0 0 0 1px var(--wog-color-gold);
}

/* ==========================================================================
   Time Slots & Date Picker
   ========================================================================== */

.woorder-time-slots {
    background-color: var(--wog-color-dark-card);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius-lg);
    padding: var(--wog-space-xl);
    margin-bottom: var(--wog-space-xl);
}

.woorder-time-slots__title,
.woorder-date-picker__title {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-lg);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-md);
}

.woorder-time-slots__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--wog-space-sm);
}

.woorder-time-slot {
    padding: var(--wog-space-sm) var(--wog-space-md);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius);
    text-align: center;
    cursor: pointer;
    transition: all var(--wog-transition-fast);
    font-size: var(--wog-text-sm);
    color: var(--wog-color-text-muted);
    background: transparent;
}

.woorder-time-slot:hover {
    border-color: var(--wog-color-gold);
    color: var(--wog-color-gold);
}

.woorder-time-slot.selected,
.woorder-time-slot.active {
    background-color: var(--wog-color-gold);
    border-color: var(--wog-color-gold);
    color: var(--wog-color-primary-dark);
    font-weight: 500;
}

.woorder-time-slot.disabled,
.woorder-time-slot[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.woorder-time-slot__capacity {
    font-size: var(--wog-text-xs);
    opacity: 0.7;
    margin-top: 2px;
}

/* ASAP Option */
.woorder-asap-option {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.1) 0%, transparent 100%);
    border: 1px solid var(--wog-color-gold);
    border-radius: var(--wog-border-radius);
    padding: var(--wog-space-md);
    margin-bottom: var(--wog-space-md);
    display: flex;
    align-items: center;
    gap: var(--wog-space-md);
    cursor: pointer;
}

.woorder-asap-option:hover {
    background: rgba(201, 169, 110, 0.15);
}

.woorder-asap-option.selected {
    background: var(--wog-color-gold);
    color: var(--wog-color-primary-dark);
}

/* Date Input Styling */
.woorder-date-picker input[type="date"],
.woorder-time-slots select {
    width: 100%;
    padding: 0.875rem var(--wog-space-md);
    font-family: var(--wog-font-body);
    font-size: var(--wog-text-base);
    color: var(--wog-color-white);
    background-color: var(--wog-color-dark-surface);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius);
    transition: border-color var(--wog-transition-fast);
}

.woorder-date-picker input[type="date"]:focus,
.woorder-time-slots select:focus {
    outline: none;
    border-color: var(--wog-color-gold);
}

/* ==========================================================================
   Tipping Section
   ========================================================================== */

.woorder-tipping {
    background-color: var(--wog-color-dark-card);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius-lg);
    padding: var(--wog-space-xl);
    margin-bottom: var(--wog-space-xl);
}

.woorder-tipping__title {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-lg);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-md);
}

.woorder-tipping__options {
    display: flex;
    gap: var(--wog-space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--wog-space-md);
}

.woorder-tipping__option {
    flex: 1;
    min-width: 70px;
}

.woorder-tipping__option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.woorder-tipping__option label {
    display: block;
    padding: var(--wog-space-sm) var(--wog-space-md);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius);
    text-align: center;
    cursor: pointer;
    transition: all var(--wog-transition-fast);
    font-size: var(--wog-text-sm);
    font-weight: 500;
    color: var(--wog-color-text-muted);
}

.woorder-tipping__option input:checked + label {
    background-color: var(--wog-color-gold);
    border-color: var(--wog-color-gold);
    color: var(--wog-color-primary-dark);
}

.woorder-tipping__option label:hover {
    border-color: var(--wog-color-gold);
    color: var(--wog-color-gold);
}

.woorder-tipping__custom input {
    width: 100%;
    padding: 0.75rem var(--wog-space-md);
    font-family: var(--wog-font-body);
    font-size: var(--wog-text-base);
    color: var(--wog-color-white);
    background-color: var(--wog-color-dark-surface);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius);
}

.woorder-tipping__custom input:focus {
    outline: none;
    border-color: var(--wog-color-gold);
}

/* ==========================================================================
   Order Bumps
   ========================================================================== */

.woorder-order-bumps {
    margin-bottom: var(--wog-space-xl);
}

.woorder-order-bump {
    background-color: var(--wog-color-dark-card);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius-lg);
    padding: var(--wog-space-lg);
    display: flex;
    align-items: center;
    gap: var(--wog-space-lg);
    margin-bottom: var(--wog-space-md);
    transition: all var(--wog-transition-fast);
}

.woorder-order-bump:hover {
    border-color: var(--wog-color-gold);
}

.woorder-order-bump__image {
    width: 80px;
    height: 80px;
    border-radius: var(--wog-border-radius);
    object-fit: cover;
    flex-shrink: 0;
}

.woorder-order-bump__info {
    flex: 1;
}

.woorder-order-bump__name {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-base);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-xs);
}

.woorder-order-bump__price {
    font-size: var(--wog-text-sm);
    color: var(--wog-color-gold);
}

.woorder-order-bump__discount {
    font-size: var(--wog-text-xs);
    color: var(--wog-color-text-muted);
    text-decoration: line-through;
    margin-left: var(--wog-space-sm);
}

.woorder-order-bump__add {
    background-color: var(--wog-color-gold);
    color: var(--wog-color-primary-dark);
    border: none;
    border-radius: var(--wog-border-radius);
    padding: var(--wog-space-sm) var(--wog-space-lg);
    font-size: var(--wog-text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--wog-transition-fast);
    white-space: nowrap;
}

.woorder-order-bump__add:hover {
    background-color: var(--wog-color-gold-light);
    transform: translateY(-1px);
}

/* ==========================================================================
   Product Addons
   ========================================================================== */

.woorder-product-addons {
    margin-top: var(--wog-space-xl);
    margin-bottom: var(--wog-space-xl);
}

.woorder-addon-group {
    background-color: var(--wog-color-dark-card);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius-lg);
    padding: var(--wog-space-lg);
    margin-bottom: var(--wog-space-md);
}

.woorder-addon-group__title {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-base);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-sm);
}

.woorder-addon-group__required {
    font-size: var(--wog-text-xs);
    color: var(--wog-color-gold);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woorder-addon-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--wog-space-sm) 0;
    border-bottom: 1px solid var(--wog-color-border);
}

.woorder-addon-option:last-child {
    border-bottom: none;
}

.woorder-addon-option label {
    display: flex;
    align-items: center;
    gap: var(--wog-space-sm);
    cursor: pointer;
    color: var(--wog-color-text-light);
    font-size: var(--wog-text-sm);
}

.woorder-addon-option input[type="checkbox"],
.woorder-addon-option input[type="radio"] {
    accent-color: var(--wog-color-gold);
    width: 18px;
    height: 18px;
}

.woorder-addon-option__price {
    font-size: var(--wog-text-sm);
    color: var(--wog-color-text-muted);
}

/* ==========================================================================
   Product Labels
   ========================================================================== */

.woorder-product-labels {
    display: flex;
    gap: var(--wog-space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--wog-space-sm);
}

.woorder-product-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   Nutrition Panel
   ========================================================================== */

.woorder-nutrition {
    background-color: var(--wog-color-dark-card);
    border: 1px solid var(--wog-color-border);
    border-radius: var(--wog-border-radius-lg);
    padding: var(--wog-space-lg);
    margin-top: var(--wog-space-md);
}

.woorder-nutrition__title {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-base);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.woorder-nutrition__table {
    width: 100%;
    border-collapse: collapse;
}

.woorder-nutrition__table tr {
    border-bottom: 1px solid var(--wog-color-border);
}

.woorder-nutrition__table tr:last-child {
    border-bottom: none;
}

.woorder-nutrition__table td {
    padding: var(--wog-space-sm) 0;
    font-size: var(--wog-text-sm);
    color: var(--wog-color-text-muted);
}

.woorder-nutrition__table td:last-child {
    text-align: right;
    color: var(--wog-color-white);
    font-weight: 500;
}

/* ==========================================================================
   Allergen Icons
   ========================================================================== */

.woorder-allergens {
    display: flex;
    gap: var(--wog-space-sm);
    flex-wrap: wrap;
    margin-top: var(--wog-space-sm);
}

.woorder-allergen {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--wog-color-text-muted);
    border: 1px solid var(--wog-color-border);
}

/* ==========================================================================
   Table Ordering Mode
   ========================================================================== */

body.woorder-table-mode .wog-header {
    background-color: rgba(10, 10, 10, 0.95);
}

body.woorder-table-mode .woorder-table-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--wog-space-sm);
    padding: var(--wog-space-xs) var(--wog-space-md);
    background-color: rgba(201, 169, 110, 0.15);
    border: 1px solid var(--wog-color-gold);
    border-radius: var(--wog-border-radius);
    font-size: var(--wog-text-xs);
    color: var(--wog-color-gold);
    font-weight: 500;
}

/* ==========================================================================
   WoOrder Checkout Section Titles
   ========================================================================== */

.woorder-section-title,
#woorder-time-slots h3,
#woorder-tipping h3,
#woorder-order-bumps h3 {
    font-family: var(--wog-font-heading);
    font-size: var(--wog-text-lg);
    color: var(--wog-color-white);
    margin-bottom: var(--wog-space-md);
    font-weight: 400;
}

/* ==========================================================================
   WoOrder Status Badges (Frontend)
   ========================================================================== */

.woorder-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--wog-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woorder-status-badge--preparing {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.woorder-status-badge--ready {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.woorder-status-badge--out-for-delivery {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.woorder-status-badge--delivered {
    background-color: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   WoOrder Receipt (Print-friendly)
   ========================================================================== */

@media print {
    .woorder-receipt {
        background: white;
        color: black;
        font-family: 'Courier New', monospace;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .woorder-service-type__options {
        grid-template-columns: repeat(2, 1fr);
    }

    .woorder-time-slots__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .woorder-tipping__options {
        flex-wrap: nowrap;
    }

    .woorder-order-bump {
        flex-direction: column;
        text-align: center;
    }

    .woorder-order-bump__image {
        width: 60px;
        height: 60px;
    }
}
