/* Override browser autofill blue background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 1 30px white inset !important;
    -webkit-text-fill-color: #111827 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Toastify z-index to show above modals */
.toastify {
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Toast Styles */
.toast-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3), 0 8px 10px -6px rgba(16, 185, 129, 0.2) !important;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3), 0 8px 10px -6px rgba(239, 68, 68, 0.2) !important;
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3), 0 8px 10px -6px rgba(59, 130, 246, 0.2) !important;
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3), 0 8px 10px -6px rgba(245, 158, 11, 0.2) !important;
}

.toast-loading {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3), 0 8px 10px -6px rgba(59, 130, 246, 0.2) !important;
}

/* Toast Close Button */
.toastify .toast-close {
    color: white !important;
    opacity: 0.6;
    padding: 0 !important;
    margin-left: auto !important;
    padding-left: 12px !important;
    font-size: 13px !important;
    cursor: pointer;
    transition: opacity 0.2s ease;
    line-height: 1;
    font-weight: 300;
    flex-shrink: 0;
    order: 2 !important;
}

.toastify .toast-close:hover {
    opacity: 1;
}

/* Minimal Square Close Button */
.modal-close-minimal {
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-minimal:hover {
    background: rgba(148, 163, 184, 0.1) !important;
    color: #000;
}

/* Custom scrollbar for dropdowns */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Language item selection - Apple style */
.lang-item .check-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
}

.lang-item .arrow-icon {
    transition: all 0.2s ease;
}

.lang-item.active .check-icon {
    opacity: 1;
    transform: scale(1);
    display: block;
}

.lang-item.active .arrow-icon {
    display: none;
}

.lang-item.active {
    background-color: rgb(249 250 251);
}

/* Smooth transitions */
.transition-all-200 {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input aesthetics matching reference */
.form-input {
    transition: all 0.2s ease-in-out;
}

.form-input:focus {
    box-shadow: 0 0 0 2px #000;
    border-color: #000;
    outline: none;
}

/* Modal Animation */
@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-up {
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Overriding dialog default display to flex when open to center the div */
dialog[open] {
    display: flex;
}
