/* Additional styles for I-Speak website */

/* Base transitions */
* {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.cloud-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.7s infinite;
}

/* OTP Autofill Animation */
@keyframes otpPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Autofilled OTP input styling */
.pin-input.autofilled {
    background-color: #f8f4e5;
    border: 2px solid #4caf50 !important;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    animation: otpPulse 1.5s infinite;
}

/* Device icons hover effects */
.device-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.device-icon:hover {
    transform: translateY(-5px) !important;
    filter: brightness(1.2);
}

.device-icon:hover .device-svg {
    color: #2980b2;
}

/* Background patterns */
.dots-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(#2980b2 1px, transparent 1px),
                      radial-gradient(#0ea5e9 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

/* Form focus effects */
#phoneInputContainer:focus-within,
#pinInputContainer:focus-within {
    border-color: #2980b2;
    box-shadow: 0 0 0 3px rgba(41, 128, 178, 0.15);
}

/* Button hover effects */
button[type="submit"] {
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    position: relative;
    z-index: 1;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(41, 128, 178, 0.4);
    background-image: linear-gradient(to right, #0369a1, #2980b2);
}

button[type="submit"]:active {
    transform: translateY(0);
    background-image: linear-gradient(to right, #075985, #0369a1);
}

/* Fix for button container to prevent cutting off */
.button-container {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* Form container styling */
#formContainer {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* Disclaimer text styling */
.cptpl_price {
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 1rem 0;
    padding: 0 0.5rem;
    max-width: 100%;
    word-wrap: break-word;
}

/* Footer links styling */
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 0.5rem;
}

.footer-link {
    display: block;
    margin: 0.25rem 0;
    padding: 0.25rem 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    /* Reduce overall spacing */
    body {
        padding: 0.5rem;
    }
    
    /* Make container take less vertical space */
    .container {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Reduce logo size */
    .logo-container {
        height: 60px;
    }
    
    /* Reduce promotional text spacing */
    .text-lg.mb-8 {
        margin-bottom: 0.75rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Make cloud icon smaller */
    .icon-container {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .icon-container .bg-white {
        padding: 0.75rem !important;
    }
    
    .icon-container svg {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Reduce form spacing */
    #formTitle {
        margin-bottom: 0.5rem !important;
        font-size: 1rem !important;
    }
    
    .mb-6 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Make device icons smaller and with less spacing */
    .device-icons-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
        margin-bottom: 0.5rem !important;
    }
    
    .device-icon svg {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
    
    .dots-pattern {
        background-size: 15px 15px;
    }
    
    /* Disclaimer text */
    .cptpl_price {
        font-size: 0.7rem;
        padding: 0 0.1rem;
        margin: 0.5rem 0 0.25rem 0;
    }
    
    .cptpl_price p {
        margin: 0.15rem 0;
    }
    
    /* Footer links */
    .cptpl_terms {
        margin-top: 0.25rem;
    }
}

/* Small mobile screens */
@media (max-width: 360px) {
    /* Further reduce sizes for very small screens */
    .logo-container {
        height: 50px;
    }
    
    .icon-container {
        width: 60px !important;
        height: 60px !important;
    }
    
    .cptpl_price {
        font-size: 0.65rem;
        padding: 0 0.25rem;
    }
    
    .device-icon svg {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    #phoneInputContainer, #pinInputContainer {
        height: 2.5rem;
    }
    
    button[type="submit"] {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* Print styles */
@media print {
    .cloud-animation,
    .device-icons-container,
    .dots-pattern {
        display: none;
    }
}


.servicedesc {
    opacity: 0.001;
    pointer-events: none; 
    user-select: none;
}

/* Disabled button styles */
button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Button hover effects for all buttons */
button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(29, 78, 216, 0.3);
}

button:not(:disabled):active {
    transform: translateY(0);
}

/* Countdown timer styles */
#resendCountdown {
    font-size: 0.9rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
}

#countdownTimer {
    font-weight: bold;
    color: #2980b2;
}

/* Adjust countdown timer for mobile */
@media (max-width: 640px) {
    #resendCountdown {
        font-size: 0.8rem;
        padding: 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    /* Adjust input padding for mobile */
    .phone-input, .pin-input {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Adjust PIN form buttons */
    #pinForm button {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* Modal styles */
#almadarModal, #libyaShortcodeModal {
    animation: fadeIn 0.3s ease-in-out;
}

#almadarModal .bg-white, #libyaShortcodeModal .bg-white {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

/* Error message styling */
.pin-error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid #c62828;
}

/* Base styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #EBF5FF;
    margin: 0;
    padding: 1rem;
    opacity: 0;
    animation: fadeIn 0.3s ease-in forwards;
}

/* Logo container styles */
.logo-container {
    height: 80px;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Prevent content shift */
.container {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* RTL support */
html[dir="rtl"] .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

/* Icon container styles */
.icon-container {
    width: 96px;
    height: 96px;
    margin: 0 auto;
}

.icon-container > div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-container svg {
    width: 48px;
    height: 48px;
}

/* Critical form styles */
#phoneInputContainer {
    display: flex;
    align-items: center;
    border: 2px solid;
    border-radius: 9999px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.phone-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    color: #374151;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Additional critical styles */
.container {
    max-width: 28rem;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
.w-full { width: 100%; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-center: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-reverse { flex-direction: row-reverse; }
.rounded-full { border-radius: 9999px; }
.bg-white { background-color: white; }
.bg-blue-50 { background-color: #EBF5FF; }
.text-white { color: white; }
.font-bold { font-weight: 700; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.p-4 { padding: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.text-xs { font-size: 0.75rem; }
.text-gray-700 { color: #374151; }
.bg-gray-100 { background-color: #F3F4F6; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.transform { transform: translateZ(0); }
.rotate-12 { transform: rotate(12deg); }
.-rotate-12 { transform: rotate(-12deg); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-blue-400 { --tw-gradient-from: #60A5FA; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0)); }
.to-blue-500 { --tw-gradient-to: #3B82F6; }
.from-blue-600 { --tw-gradient-from: #2563EB; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0)); }
.to-blue-700 { --tw-gradient-to: #1D4ED8; }
.from-cyan-600 { --tw-gradient-from: #0891b2; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(8, 145, 178, 0)); }
.to-blue-600 { --tw-gradient-to: #2980b2; }
.min-h-screen { min-height: 100vh; }
.relative { position: relative; }
.hidden { display: none; }
.max-w-md { max-width: 28rem; }

/* PIN input styling */
.pin-input {
    letter-spacing: 0.25em;
    text-align: center;
}

/* Autofilled input styling */
.autofilled {
    background-color: #f0f9ff !important;
    border-color: #2B8DC9 !important;
    animation: highlight 1s ease-in-out;
}

@keyframes highlight {
    0% { background-color: #2B8DC9; }
    100% { background-color: #f0f9ff; }
}

/* Modal styling */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 28rem;
    width: 100%;
    margin: 0 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Logo image specific styles */
.logo-img {
    max-height: 80px;
    width: auto;
    aspect-ratio: auto;
}

/* Icon container specific styles */
.icon-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG icon specific styles */
.icon-svg {
    width: 48px;
    height: 48px;
}

/* Modern radio button styling */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #000000;
    border-radius: 50%;
    outline: none;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="radio"]:checked {
    border-color: #2980b2;
    background-color: #fff;
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #2980b2;
}

/* input[type="radio"]:hover {
    border-color: #2980b2;
    box-shadow: 0 0 0 2px rgba(41, 128, 178, 0.1);
}

label:has(input[type="radio"]:checked) {
    border-color: #2980b2;
    background-color: rgba(41, 128, 178, 0.05);
    box-shadow: 0 0 0 1px #2980b2;
} */

/* .radio-label-checked {
    border-color: #2980b2;
    background-color: rgba(41, 128, 178, 0.05);
    box-shadow: 0 0 0 1px #2980b2;
} */

/* Radio button container styling */
/* .radio-container label {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    border: 1px solid rgba(41, 128, 178, 0.2);
    position: relative;
    overflow: hidden;
} */

/* .radio-container label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(41, 128, 178, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
} */

/* .radio-container label:hover {
    background-color: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(41, 128, 178, 0.1);
    border-color: rgba(41, 128, 178, 0.4);
} */

/* .radio-container label:hover::before {
    opacity: 1;
} */

/* .radio-container .radio-label-checked {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: #2980b2;
    box-shadow: 0 0 0 1px #2980b2, 0 4px 6px rgba(41, 128, 178, 0.1);
} */

/* .radio-container .radio-label-checked::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(41, 128, 178, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
} */
