/* ==========================================================================
   1. App Container & Background Animation
   ========================================================================== */
#fajr-events-app.fajr-container {
    font-family: 'League Spartan', sans-serif;
    max-width: 960px;
    margin: 15px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(59, 155, 18, 0.08);
    position: relative;
    overflow: hidden;
    animation: appEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

#fajr-events-app.fajr-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" opacity="0.035"><text x="10" y="30" font-size="22">🥩🥛🥚🍗</text><text x="60" y="90" font-size="22">🍃✨🛒Dates</text></svg>');
    animation: floatDoodle 40s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatDoodle {
    from { background-position: 0 0; }
    to { background-position: 120px 120px; }
}

#fajr-events-app * {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* ==========================================================================
   2. Header & Service Tabs (Stacked & Mobile-Friendly)
   ========================================================================== */
.fajr-header { 
    text-align: center; 
    margin-bottom: 20px; 
}

.fajr-header h2 {
    font-size: 2rem; 
    font-weight: 700;
    background: linear-gradient(135deg, #3b9b12, #4fcd1a);
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.fajr-header p { 
    color: #555; 
    font-size: 0.95rem; 
    line-height: 1.4;
}

.fajr-tabs { 
    display: flex; 
    flex-direction: column; /* Stack vertically on phones so they never overflow */
    gap: 10px; 
    margin-bottom: 20px; 
}

.fajr-tab-btn {
    width: 100%;
    text-align: center;
    padding: 13px 18px; 
    border: 2px solid #3b9b12; 
    background: #ffffff; 
    color: #3b9b12;
    font-weight: 700; 
    font-size: 0.95rem; 
    border-radius: 14px; 
    cursor: pointer; 
    transition: all 0.3s ease;
}

.fajr-tab-btn.active, .fajr-tab-btn:hover {
    background: linear-gradient(135deg, #3b9b12, #4fcd1a); 
    color: #fff;
    box-shadow: 0 6px 18px rgba(79, 205, 26, 0.3); 
    transform: translateY(-2px);
}

/* ==========================================================================
   3. Card Sections & Horizontal Skip Button
   ========================================================================== */
.fajr-card-section {
    background: rgba(250, 250, 250, 0.95); 
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px; 
    padding: 16px; 
    margin-bottom: 18px;
}

.fajr-card-section h3 {
    color: #3b9b12; 
    margin-top: 0; 
    font-size: 1.15rem;
    border-bottom: 2px solid #eba51d; 
    padding-bottom: 6px; 
    display: inline-block;
}

.fajr-section-header { 
    display: flex; 
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.fajr-btn-glow {
    background: #eba51d; 
    color: #fff; 
    border: none; 
    padding: 10px 16px;
    border-radius: 20px; 
    font-weight: 700; 
    font-size: 0.9rem;
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    animation: fajrGlow 2.5s infinite alternate;
}

@keyframes fajrGlow {
    from { box-shadow: 0 0 5px rgba(235, 165, 29, 0.4); }
    to { box-shadow: 0 0 15px rgba(235, 165, 29, 0.8); }
}

/* ==========================================================================
   4. Grids & Inputs (Single Column on Phone)
   ========================================================================== */
.fajr-grid-2, .fajr-grid-3 { 
    display: grid; 
    grid-template-columns: 1fr; /* Single column stacking for mobile readability */
    gap: 12px; 
}

.fajr-input-group { 
    margin-top: 12px; 
}
.fajr-input-group label { 
    display: block; 
    font-weight: 600; 
    color: #222; 
    margin-bottom: 5px; 
    font-size: 0.92rem; 
}
.fajr-input-group label .required { 
    color: #e74c3c; 
}
.item-desc { 
    display: block; 
    font-size: 0.78rem; 
    color: #666; 
    margin-bottom: 4px; 
    font-style: italic; 
}

.fajr-input-group input, 
.fajr-input-group select, 
.fajr-input-group textarea {
    width: 100%; 
    padding: 12px; 
    border: 1.5px solid #e0e0e0; 
    border-radius: 12px;
    font-size: 1rem; 
    font-family: 'League Spartan', sans-serif; 
    outline: none; 
    background: #fff;
    -webkit-appearance: none; /* Removes default iOS rounded input styling */
}

/* Cute Green Calendar Date Picker */
.fajr-calendar-input {
    accent-color: #3b9b12;
    cursor: pointer;
}
.fajr-calendar-input::-webkit-calendar-picker-indicator {
    filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(85deg) brightness(95%) contrast(92%);
    cursor: pointer;
    padding: 6px;
}

.fajr-input-group input:focus, 
.fajr-input-group select:focus, 
.fajr-input-group textarea:focus {
    border-color: #3b9b12; 
    box-shadow: 0 0 0 3px rgba(59, 155, 18, 0.12);
}

.error-msg { 
    color: #e74c3c; 
    font-size: 0.78rem; 
    display: none; 
    margin-top: 4px; 
}
.fajr-input-group.error input, 
.fajr-input-group.error select { 
    border-color: #e74c3c; 
}
.fajr-input-group.error .error-msg { 
    display: block; 
}

.fajr-phone-wrapper {
    display: flex; 
    align-items: center; 
    border: 1.5px solid #e0e0e0; 
    border-radius: 12px; 
    overflow: hidden; 
    background: #fff;
}
.fajr-phone-wrapper:focus-within { 
    border-color: #3b9b12; 
    box-shadow: 0 0 0 3px rgba(59, 155, 18, 0.12); 
}
.fajr-country-code { 
    background: #f4f4f4; 
    padding: 12px 14px; 
    font-weight: 700; 
    color: #444; 
    border-right: 1.5px solid #e0e0e0; 
    font-size: 0.95rem;
}
.fajr-phone-wrapper input { 
    border: none !important; 
    box-shadow: none !important; 
}

/* ==========================================================================
   5. Inline Checkout & Action Buttons
   ========================================================================== */
.fajr-inline-checkout {
    margin-top: 20px;
    background: #ffffff;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid rgba(59, 155, 18, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.fajr-estimation-display span { 
    font-size: 0.8rem; 
    color: #eba51d; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    display: block; 
    font-weight: 700; 
}
.fajr-estimation-display strong { 
    font-size: 1.8rem; 
    color: #3b9b12; 
    font-weight: 700; 
}

.fajr-action-buttons { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    width: 100%;
}

.minimal-brand-btn {
    background: #ffffff;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'League Spartan', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: background 0.2s;
}

.minimal-brand-btn.btn-green {
    border: 2px solid #3b9b12;
    color: #3b9b12;
}
.minimal-brand-btn.btn-green:active {
    background: #3b9b12;
    color: #ffffff;
}

.minimal-brand-btn.btn-yellow {
    border: 2px solid #eba51d;
    color: #b37d11;
}
.minimal-brand-btn.btn-yellow:active {
    background: #eba51d;
    color: #170c38;
}

/* ==========================================================================
   6. Tablet & Desktop Enhancements (Min-Width 768px)
   ========================================================================== */
@media(min-width: 768px) {
    #fajr-events-app.fajr-container {
        padding: 35px;
        margin: 30px auto;
    }
    .fajr-tabs {
        flex-direction: row;
        justify-content: center;
    }
    .fajr-tab-btn {
        flex: 1;
        border-radius: 30px;
    }
    .fajr-section-header {
        flex-direction: row;
        align-items: center;
    }
    .fajr-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
    .fajr-grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .fajr-inline-checkout {
        flex-direction: row;
        text-align: left;
        padding: 22px;
    }
    .fajr-action-buttons {
        flex-direction: row;
        width: auto;
    }
    .minimal-brand-btn {
        width: auto;
        padding: 12px 24px;
    }
}