/**
 * Easy Suite Frontend Styles
 */

/* CSS Variables */
:root {
    --easy-primary: #2D3748;
    --easy-accent: #4FD1C5;
    --easy-success: #48BB78;
    --easy-warning: #ED8936;
    --easy-error: #F56565;
    --easy-bg: #FFFFFF;
    --easy-bg-alt: #F7FAFC;
    --easy-text: #1A202C;
    --easy-text-light: #718096;
    --easy-border: #E2E8F0;
    --easy-radius: 8px;
    --easy-radius-sm: 4px;
    --easy-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --easy-shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --easy-transition: 0.2s ease;
}

/* Reset */
.es-wrap *, .es-wrap *::before, .es-wrap *::after { box-sizing: border-box; }

/* Typography */
.es-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; color: var(--easy-text); line-height: 1.5; }
.es-wrap h1, .es-wrap h2, .es-wrap h3 { margin: 0 0 1rem; font-weight: 600; }

/* Buttons */
.es-btn, .es-wrap .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--easy-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--easy-transition);
    text-decoration: none;
}

.es-btn-primary, .es-wrap .button-primary {
    background: var(--easy-accent);
    color: #fff;
}

.es-btn-primary:hover, .es-wrap .button-primary:hover {
    filter: brightness(1.1);
}

.es-btn:disabled, .es-wrap .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cards */
.es-card {
    background: var(--easy-bg);
    border-radius: var(--easy-radius);
    box-shadow: var(--easy-shadow);
    overflow: hidden;
    transition: var(--easy-transition);
}

.es-card:hover {
    box-shadow: var(--easy-shadow-lg);
    transform: translateY(-2px);
}

/* Forms */
.es-form-field {
    margin-bottom: 15px;
}

.es-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.es-form-field input[type="text"],
.es-form-field input[type="email"],
.es-form-field input[type="tel"],
.es-form-field input[type="number"],
.es-form-field input[type="date"],
.es-form-field input[type="time"],
.es-form-field select,
.es-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--easy-border);
    border-radius: var(--easy-radius-sm);
    font-size: 14px;
    transition: var(--easy-transition);
}

.es-form-field input:focus,
.es-form-field select:focus,
.es-form-field textarea:focus {
    outline: none;
    border-color: var(--easy-accent);
    box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.2);
}

/* Grid */
.es-grid {
    display: grid;
    gap: 20px;
}

.es-grid-2 { grid-template-columns: repeat(2, 1fr); }
.es-grid-3 { grid-template-columns: repeat(3, 1fr); }
.es-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .es-grid-2, .es-grid-3, .es-grid-4 { grid-template-columns: 1fr; }
}

/* Status Badges */
.es-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.es-status-pending, .es-status-draft { background: #FED7D7; color: #C53030; }
.es-status-confirmed, .es-status-active, .es-status-publish { background: #C6F6D5; color: #276749; }
.es-status-completed, .es-status-valid { background: #BEE3F8; color: #2B6CB0; }
.es-status-cancelled, .es-status-inactive { background: #E2E8F0; color: #4A5568; }

/* Loading Spinner */
.es-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: es-spin 0.75s linear infinite;
}

@keyframes es-spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.es-alert {
    padding: 15px;
    border-radius: var(--easy-radius-sm);
    margin-bottom: 15px;
}

.es-alert-success { background: #C6F6D5; color: #276749; }
.es-alert-error { background: #FED7D7; color: #C53030; }
.es-alert-warning { background: #FEEBC8; color: #C05621; }
.es-alert-info { background: #BEE3F8; color: #2B6CB0; }

/* Cart Widget */
.es-cart-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--easy-primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--easy-shadow-lg);
    z-index: 999;
    transition: var(--easy-transition);
}

.es-cart-widget:hover {
    transform: scale(1.05);
}

.es-cart-widget.es-cart-updated {
    animation: es-bounce 0.3s ease;
}

@keyframes es-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.es-cart-count {
    background: var(--easy-accent);
    color: var(--easy-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

/* Time Slots */
.es-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.es-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--easy-border);
    border-radius: var(--easy-radius);
    cursor: pointer;
    transition: var(--easy-transition);
    min-width: 100px;
}

.es-slot:hover {
    border-color: var(--easy-accent);
}

.es-slot input {
    display: none;
}

.es-slot input:checked + span {
    font-weight: 600;
}

.es-slot input:checked ~ * {
    color: var(--easy-accent);
}

.es-slot-price {
    font-size: 12px;
    color: var(--easy-text-light);
    margin-top: 4px;
}

/* Events List */
.es-events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.es-event-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    padding: 20px;
    background: var(--easy-bg);
    border: 1px solid var(--easy-border);
    border-radius: var(--easy-radius);
    align-items: center;
}

.es-event-date {
    text-align: center;
    background: var(--easy-accent);
    color: #fff;
    padding: 10px 15px;
    border-radius: var(--easy-radius);
    min-width: 70px;
}

.es-event-date-day {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.es-event-date-month {
    font-size: 12px;
    text-transform: uppercase;
}

.es-event-info h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.es-event-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--easy-text-light);
}

.es-event-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.es-event-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--easy-primary);
}

/* Responsive */
@media (max-width: 600px) {
    .es-event-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .es-event-date {
        justify-self: center;
    }
    
    .es-event-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}
