/* 
 * Ericeira Local Surf Booking - Premium Stylesheet
 */

:root {
    --esb-font-main: 'Inter', sans-serif;
    --esb-font-heading: 'Outfit', sans-serif;
    
    /* Colors */
    --esb-primary: #0ea5e9;        /* Wave Blue */
    --esb-primary-hover: #0284c7;  /* Deep Wave Blue */
    --esb-accent: #f59e0b;         /* Sandy Sunset Gold */
    --esb-success: #10b981;        /* Emerald Foam */
    --esb-error: #f43f5e;          /* Coral Red */
    
    /* Backgrounds */
    --esb-card-bg: rgba(255, 255, 255, 0.95);
    --esb-input-bg: #f8fafc;
    --esb-input-border: #e2e8f0;
    --esb-text-main: #1e293b;
    --esb-text-muted: #64748b;
    
    /* Dark Mode variables for glassmorphism options */
    --esb-glass-bg: rgba(15, 23, 42, 0.65);
    --esb-glass-border: rgba(255, 255, 255, 0.08);
    --esb-glass-text: #f8fafc;
    
    /* Shadow & Radius */
    --esb-radius-lg: 20px;
    --esb-radius-md: 12px;
    --esb-radius-sm: 8px;
    --esb-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --esb-shadow-input: 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    --esb-shadow-glow: 0 0 0 4px rgba(14, 165, 233, 0.15);
    
    /* Transition */
    --esb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container & Typography Setup */
.esb-booking-container {
    font-family: var(--esb-font-main);
    color: var(--esb-text-main);
    line-height: 1.5;
    margin: 2rem auto;
    max-width: 780px;
    width: 100%;
    box-sizing: border-box;
}

.esb-booking-container *, 
.esb-booking-container *::before, 
.esb-booking-container *::after {
    box-sizing: border-box;
}

/* Card Styling */
.esb-booking-card {
    background: var(--esb-card-bg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--esb-radius-lg);
    box-shadow: var(--esb-shadow-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

/* Background Wave Accents */
.esb-booking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--esb-primary) 0%, var(--esb-accent) 50%, var(--esb-primary) 100%);
    background-size: 200% auto;
    animation: waveMove 6s linear infinite;
}

@keyframes waveMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
.esb-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.esb-badge {
    background: rgba(14, 165, 233, 0.1);
    color: var(--esb-primary);
    font-family: var(--esb-font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.esb-card-header h2 {
    font-family: var(--esb-font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.esb-card-header p {
    color: var(--esb-text-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Grid Layout */
.esb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .esb-form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 1.25rem;
    }
    .esb-booking-card {
        padding: 1.5rem;
    }
    .esb-card-header h2 {
        font-size: 1.75rem;
    }
}

.esb-form-group {
    display: flex;
    flex-direction: column;
}

/* Labels */
.esb-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.esb-required {
    color: var(--esb-error);
    margin-left: 2px;
}

.esb-optional {
    color: var(--esb-text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 4px;
}

/* Input Fields & Icons */
.esb-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.esb-input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.1rem;
    pointer-events: none;
    user-select: none;
    opacity: 0.7;
}

.esb-form-group input,
.esb-form-group select,
.esb-form-group textarea {
    width: 100%;
    background: var(--esb-input-bg);
    border: 1.5px solid var(--esb-input-border);
    border-radius: var(--esb-radius-md);
    color: var(--esb-text-main);
    font-family: var(--esb-font-main);
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    transition: var(--esb-transition);
    outline: none;
    box-shadow: var(--esb-shadow-input);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Padding adjustments for input with icons */
.esb-input-wrapper input,
.esb-input-wrapper select {
    padding-left: 2.75rem;
}

/* Dropdown arrow custom styling */
.esb-input-wrapper select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Focus States */
.esb-form-group input:focus,
.esb-form-group select:focus,
.esb-form-group textarea:focus {
    border-color: var(--esb-primary);
    background: #ffffff;
    box-shadow: var(--esb-shadow-glow);
}

/* Phone Wrapper & Select */
.esb-phone-wrapper {
    display: flex;
    gap: 0.5rem;
}

.esb-country-select {
    width: 130px !important;
    flex-shrink: 0;
    padding-right: 2rem !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.9rem;
}

.esb-phone-wrapper input {
    flex-grow: 1;
}

/* Textarea Customization */
.esb-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button */
.esb-submit-btn {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--esb-primary) 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--esb-radius-md);
    padding: 1rem 2rem;
    font-family: var(--esb-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
    transition: var(--esb-transition);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.esb-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.esb-submit-btn:active {
    transform: translateY(0);
}

.esb-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner Loader */
.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.esb-spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.esb-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Helper Class */
.esb-hidden {
    display: none !important;
}

/* Feedback Messages */
.esb-feedback {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--esb-radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}

.esb-feedback::before {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.esb-feedback.esb-success {
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.esb-feedback.esb-success::before {
    content: '✅';
}

.esb-feedback.esb-error {
    background: #fff5f5;
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #9f1239;
    animation: shake 0.4s ease;
}

.esb-feedback.esb-error::before {
    content: '⚠️';
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}


/* ==========================================================================
   FEEDBACK ACTION PAGES (Approve / Reject UI)
   ========================================================================== */

.esb-action-body {
    background: radial-gradient(circle at 10% 20%, rgb(15, 23, 42) 0%, rgb(30, 41, 59) 90.1%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: var(--esb-font-main);
}

.esb-action-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--esb-glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    color: var(--esb-glass-text);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.esb-action-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    font-size: 2.75rem;
    position: relative;
}

.esb-action-card.approved .esb-action-icon-wrapper {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--esb-success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.esb-action-card.rejected .esb-action-icon-wrapper {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--esb-error);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.2);
}

.esb-action-icon-wrapper::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
    to { transform: rotate(360deg); }
}

.esb-action-title {
    font-family: var(--esb-font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    letter-spacing: -0.01em;
}

.esb-action-card.approved .esb-action-title {
    background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.esb-action-card.rejected .esb-action-title {
    background: linear-gradient(135deg, #ffffff 0%, #fecdd3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.esb-action-message {
    font-size: 1.1rem;
    color: rgba(248, 250, 252, 0.85);
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.esb-action-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.esb-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.esb-detail-row:last-child {
    margin-bottom: 0;
}

.esb-detail-label {
    color: rgba(248, 250, 252, 0.5);
    font-weight: 500;
}

.esb-detail-value {
    color: #ffffff;
    font-weight: 600;
}

.esb-btn-back {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--esb-transition);
}

.esb-btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
