/* Additional styles to ensure compatibility with Bootstrap */

/* Set Almarai font for the entire application */
body {
    font-family: 'Almarai', sans-serif;
}

/* Dashboard specific font styles */
.dashboard-container {
    font-family: 'Almarai', sans-serif;
}

.dashboard-title {
    font-family: 'Almarai', sans-serif;
    font-weight: 700;
}

.dashboard-card {
    font-family: 'Almarai', sans-serif;
}

/* Override bootstrap RTL specific issues */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(var(--bs-gutter-x) * -.5);
    margin-left: calc(var(--bs-gutter-x) * -.5);
}

/* Make sure buttons have correct styling - Higher specificity to override clean.css */
.btn {
    display: inline-block !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9rem !important;
    border-radius: 0.4rem !important;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out !important;
}

/* Larger button sizes */
.btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
}

.btn-sm {
    padding: .5rem 1rem !important;
    font-size: 1.1rem !important;
    border-radius: .375rem !important;
}

/* Auth page specific button styles */
.auth-actions .btn,
.auth-card .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    margin-top: 1rem !important;
}

/* Hero section button styles */
.hero .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    margin: 0.5rem !important;
}

/* CTA section button styles */
.cta-section .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
}

/* Navbar button styles - smaller size */
.navbar .btn,
.navbar-auth .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    z-index: 1000 !important;
    animation: whatsapp-bounce 2s infinite !important;
}

.whatsapp-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 60px !important;
    background-color: #25d366 !important;
    color: white !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    transition: all 0.3s ease !important;
    font-size: 28px !important;
}

.whatsapp-link:hover {
    background-color: #128c7e !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6) !important;
    color: white !important;
}

@keyframes whatsapp-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile responsive for WhatsApp button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px !important;
        left: 20px !important;
    }
    
    .whatsapp-link {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
}

/* Mobile menu styles */
@media (max-width: 767.98px) {
    .content {
        padding-top: 4rem !important; /* Additional space for mobile menu */
    }
    
    .hero {
        padding-top: 6rem !important;
    }
}

/* Ensure bootstrap and custom styles work together */
.container {
    width: 100%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Additional helpers */
.text-white {
    color: white !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix animation delays on mobile */
@media (max-width: 767.98px) {
    .slide-in-right, .slide-in-left, .fade-in {
        animation-delay: 0s !important;
    }
    
    .row [class*="col-"] {
        margin-bottom: 1.5rem;
    }
}

/* Improve focus styles for accessibility */
a:focus, button:focus, .btn:focus {
    outline: 2px solid rgba(var(--primary-rgb), 0.5);
    outline-offset: 2px;
}

/* Make images responsive by default */
img {
    max-width: 100%;
    height: auto;
}

/* PayMob SDK - Custom styles for savecard checkbox */
/* More aggressive approach with !important flags and multiple selectors */
input[type="checkbox"].paymob-savecard-checkbox,
[data-paymob-field="saveCard"],
.paymob-savecard,
.paymob-save-card-checkbox,
.paymob-checkbox,
[data-paymob="saveCard"],
#paymob-payment-container input[type="checkbox"],
#paymob-elements input[type="checkbox"] {
    accent-color: #8452df !important;
}

input[type="checkbox"].paymob-savecard-checkbox:checked,
[data-paymob-field="saveCard"]:checked,
.paymob-savecard:checked,
.paymob-save-card-checkbox:checked,
.paymob-checkbox:checked,
[data-paymob="saveCard"]:checked,
#paymob-payment-container input[type="checkbox"]:checked,
#paymob-elements input[type="checkbox"]:checked,
input[data-paymob-field="saveCard"]:checked {
    /* More prominent white checkmark on blue background */
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-color: #8452df !important;
    background-size: 80% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-color: #8452df !important;
    position: relative !important;
}
