
:root {
    --main-color: #FD5C02;
    /* Custom styling defaults — overridden by _custom_styling.blade.php when active */
    --custom-main-color: #FD5C02;
    --custom-secondary-color: #CA4901;
    --custom-bg-color: #ffffff;
    --primary-text-color: #1f2937;
    --secondary-text-color: #6b7280;
    --custom-header-bg-color: #f8fafc;
}

body {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 25px));
}

/* Newsletter Input Animation */
.newsletter-input-wrapper {
    position: relative;
}

.newsletter-input {
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    box-shadow: 0 0 0 3px rgba(253, 92, 2, 0.15);
}

.newsletter-input:focus + .input-highlight {
    width: 100%;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #FD5C02, #CA4901);
    transition: width 0.3s ease;
    border-radius: 0 0 4px 4px;
}

/* Link hover animation */
.footer-link {
    position: relative;
    transition: all 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FD5C02, #CA4901);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.footer-link:hover::after {
    width: 100%;
}

/* Social icon pulse animation */
.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(253, 92, 2, 0.3);
}

/* Subscribe button animation */
.subscribe-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subscribe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.subscribe-btn:hover::before {
    left: 100%;
}

/* Divider gradient animation */
.gradient-divider {
    background: linear-gradient(90deg, transparent, rgba(253, 92, 2, 0.3), transparent);
    height: 1px;
}

/* Footer wave decoration */
.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Fade in animation on scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

/* Gradient Divider - matching footer */
.gradient-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-main-color), transparent);
    opacity: 0.3;
}

/* Float Animation - matching footer */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Dropdown open states */
#dropdownMenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#dropdownArrow.rotated {
    transform: rotate(180deg);
}

/* Mobile menu open states */
#mobileNav.active {
    height: calc(100vh - 4rem);
}

@media (min-width: 640px) {
    #mobileNav.active {
        height: calc(100vh - 70px);
    }
}

#mobileNavContent.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hamburger animation */
#mobileMenuBtn.active #hamburger1 {
    transform: rotate(45deg) translate(4px, 4px);
    background-color: var(--color-main-color);
}

#mobileMenuBtn.active #hamburger2 {
    opacity: 0;
    transform: scaleX(0);
}

#mobileMenuBtn.active #hamburger3 {
    transform: rotate(-45deg) translate(4px, -4px);
    background-color: var(--color-main-color);
}

/* Subtle hover lift for dropdown items */
.dropdown-item:hover {
    transform: translateX(4px);
}

/* Mobile nav link stagger animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

#mobileNavContent.active .mobile-nav-link {
    opacity: 1;
    transform: translateX(0);
}

#mobileNavContent.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.05s;
}

#mobileNavContent.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.1s;
}

#mobileNavContent.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.15s;
}

#mobileNavContent.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.2s;
}

#mobileNavContent.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.25s;
}

#mobileNavContent.active .mobile-nav-link:nth-child(6) {
    transition-delay: 0.3s;
}

#mobileNavContent.active .mobile-nav-link:nth-child(7) {
    transition-delay: 0.35s;
}

/* Fade in up animation for elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Glass effect enhancement */
@supports (backdrop-filter: blur(12px)) {
    header {
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.9));
    }
}

/* Smooth scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

.checkout-container {
    animation: fadeIn 0.4s ease;
}

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

.checkout-section {
    transition: all 0.2s ease;
}

.checkout-input {
    transition: all 0.2s ease;
}

.checkout-input:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--custom-main-color) 12%, transparent);
    border-color: var(--custom-main-color);
}

.checkout-input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.btn-primary-checkout {
    background: linear-gradient(135deg, var(--custom-main-color), var(--custom-secondary-color));
    transition: all 0.3s ease;
}

.btn-primary-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--custom-main-color) 35%, transparent);
}

.btn-primary-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-checkout {
    transition: all 0.2s ease;
}

.btn-outline-checkout:hover {
    border-color: var(--custom-main-color);
    color: var(--custom-main-color);
}

.order-type-switch {
    display: flex;
    background: #f3f4f6;
    border-radius: 20px;
    padding: 3px;
}

.order-type-option {
    padding: 8px 16px;
    border-radius: 17px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.order-type-option.active {
    background: var(--custom-main-color);
    color: white;
}

.order-type-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.disabled-element {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.editable-field {
    position: relative;
}

.edit-btn {
    transition: all 0.2s ease;
}

.edit-btn:hover {
    color: var(--custom-main-color);
}

.save-btn {
    background: var(--custom-main-color);
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.save-btn:hover {
    background: var(--custom-secondary-color);
}

.order-items-scroll {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.order-items-scroll::-webkit-scrollbar {
    width: 4px;
}

.order-items-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.order-items-scroll::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}

.detail-row {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    padding: 2px 5px;
    display: inline-block;
}

.detail-value {
    font-size: 14px;
    color: #1f2937;
    margin-top: 4px;
}

.address-lookup-container {
    position: relative;
}

.pac-container {
    z-index: 9999 !important;
}

/* ==============================
   Payment Page Styles
   ============================== */

.payment-container {
    animation: fadeIn 0.4s ease;
}

.payment-section {
    transition: all 0.2s ease;
}

/* Total amount gradient card */
.payment-total-card {
    background: linear-gradient(135deg, var(--custom-main-color) 0%, var(--custom-secondary-color) 50%, color-mix(in srgb, var(--custom-secondary-color) 75%, #000) 100%);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--custom-main-color) 25%, transparent);
    position: relative;
    overflow: hidden;
}

.payment-total-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.payment-total-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

/* Payment provider option cards */
.payment-provider-option {
    outline: none;
}

.payment-provider-option:hover {
    border-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.payment-provider-option.selected-payment-provider {
    border-color: var(--custom-main-color) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--custom-main-color) 2%, transparent), color-mix(in srgb, var(--custom-main-color) 6%, transparent));
    box-shadow: 0 2px 12px color-mix(in srgb, var(--custom-main-color) 12%, transparent);
}

.payment-provider-icon-wrapper {
    background: #f9fafb;
    transition: all 0.2s ease;
}

.payment-provider-option.selected-payment-provider .payment-provider-icon-wrapper {
    background: color-mix(in srgb, var(--custom-main-color) 8%, transparent);
}

.payment-check-selected {
    background: var(--main-color);
    border-color: var(--main-color);
}

/* Shake animation for validation */
@keyframes paymentShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
    }
}

.payment-shake {
    animation: paymentShake 0.6s ease;
}

/* Confirmation modal animations */
.payment-modal-backdrop {
    transition: opacity 0.2s ease;
}

.payment-modal-content {
    animation: paymentModalSlideUp 0.3s ease;
}

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

@media (min-width: 640px) {
    .payment-modal-content {
        animation: paymentModalScaleIn 0.25s ease;
    }

    @keyframes paymentModalScaleIn {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* ==============================
   Payment Details Page Styles
   ============================== */

.payment-details-container {
    animation: fadeIn 0.4s ease;
}

/* Status card gradient */
.payment-details-status-card {
    background: linear-gradient(135deg, var(--custom-main-color) 0%, var(--custom-secondary-color) 50%, color-mix(in srgb, var(--custom-secondary-color) 75%, #000) 100%);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--custom-main-color) 25%, transparent);
    position: relative;
    overflow: hidden;
}

.payment-details-status-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.payment-details-status-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

/* Error status card gradient (for rejected/failed/cancelled) */
.payment-details-status-card-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25);
    position: relative;
    overflow: hidden;
}

.payment-details-status-card-error::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.payment-details-status-card-error::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

/* ==============================
   Previous Orders Page Styles
   ============================== */

.previous-orders-container {
    animation: fadeIn 0.4s ease;
}

.order-card {
    transition: all 0.2s ease;
}

.order-card:hover {
    transform: translateY(-2px);
}


/* ============================================
   Restaurant Info Popup
   ============================================ */

/* Trigger wrapper - contains both button and popup */
.restaurant-info-trigger-wrapper {
    position: relative;
    display: inline-block;
}

/* Info trigger button */
.restaurant-info-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Info Popup Container */
.restaurant-info-popup {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.restaurant-info-popup.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Popup Arrow */
.popup-arrow {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #2c8dc7;
}

/* Popup Content Container */
.popup-content {
    background: linear-gradient(135deg, #2c8dc7 0%, #2979AF 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Popup Header */
.popup-header {
    padding: 16px 20px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.popup-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* Popup Sections */
.popup-section {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-section:last-child {
    border-bottom: none;
}

.popup-section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Contact Links */
.popup-contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 0.875rem;
    padding: 6px 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.popup-contact-link:hover {
    color: #FFE4D6;
}

.popup-contact-link:hover .popup-icon {
    transform: scale(1.1);
}

/* Address (non-link) */
.popup-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #ffffff;
    font-size: 0.875rem;
    padding: 6px 0;
}

/* Icons */
.popup-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.9);
}

/* App Download Section */
.popup-apps {
    text-align: center;
}

.popup-app-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.popup-app-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    transition: all 0.2s ease;
}

.popup-app-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.popup-app-icon {
    width: 24px;
    height: 24px;
}

/* Opening Hours Section */
.popup-hours {
    padding-bottom: 16px;
}

.popup-hours-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 16px;
}

.popup-hours-row {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    color: #ffffff;
    padding: 3px 0;
}

.popup-day {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    min-width: 32px;
}

.popup-time {
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
}
