/* ============================================
   LOGIN PAGE STYLING - EXACT WeReplay DESIGN
   Author: 4Born Technologies
   Based on WeReplay Admin Panel design
   Using Taskboard Teal Theme colors
   ============================================ */

/* ============================================
   TAILWIND CONFIGURATION FOR COLORS
   ============================================ */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Define custom colors to match Taskboard theme exactly */
:root {
    /* Primary Teal Colors - Exact match from taskboard-teal-theme.css */
    --primary-teal: #14B8A6;
    --primary-teal-dark: #0D9488;
    --primary-teal-light: #2DD4BF;
    --primary-teal-lighter: #5EEAD4;
    --primary-teal-bg: rgba(20, 184, 166, 0.1);

    /* Status Colors */
    --success-green: #10B981;
    --success-green-light: #34D399;
    --danger-red: #EF4444;
    --danger-red-light: #F87171;
    --warning-yellow: #FCB401;

    /* Neutral Colors */
    --dark-text: #1F2937;
    --medium-text: #4B5563;
    --light-text: #6B7280;
    --border-color: #E5E7EB;
    --bg-light: #F9FAFB;
    --bg-lighter: #F3F4F6;
    --bg-white: #FFFFFF;

    /* Shadows - Enhanced for user-friendly login page */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-teal: 0 4px 14px 0 rgba(20, 184, 166, 0.15);
    --shadow-teal-lg: 0 10px 25px 0 rgba(20, 184, 166, 0.2);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
}

/* Main card shadow */
.login-card {
    box-shadow: var(--shadow-2xl) !important;
}

/* ============================================
   ANIMATIONS - Login Page Animations
   ============================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

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


/* ============================================
   CUSTOM STYLES FOR ENHANCED FUNCTIONALITY
   ============================================ */

/* Enhanced Form Validation Styles - No red borders on inputs */
input:invalid:not(:placeholder-shown) {
    /* No red border styling - inputs remain normal */
}

/* Success Message Styling */
#loginMessage.bg-green-50 {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--success-green) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

/* Error Message Styling */
#loginMessage.bg-red-50 {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: var(--danger-red) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* Loading State for Button */
#loginBtn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: var(--medium-text) !important;
}

/* Enhanced Focus States */
input:focus {
    border-color: var(--primary-teal) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Remove all shadows from inputs */
input {
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

/* Default input styling - ensure normal borders */
input {
    border-color: var(--border-color) !important;
}

/* Eye icon colors */
#loginPasswordEyeIcon path,
#loginPasswordEyeIcon circle,
#loginPasswordEyeIconClosed path,
#loginPasswordEyeIconClosed line {
    stroke: var(--medium-text) !important;
}

/* OTP Input Styles */
.otp-input {
    width: 3rem !important;
    height: 3rem !important;
    text-align: center !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.5rem !important;
    background-color: var(--bg-white) !important;
    color: var(--dark-text) !important;
    transition: all var(--transition-fast) !important;
    outline: none !important;
}

.otp-input:focus {
    border-color: var(--primary-teal) !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1) !important;
    transform: scale(1.05) !important;
}

.otp-input:not(:placeholder-shown) {
    border-color: var(--primary-teal) !important;
    background-color: rgba(20, 184, 166, 0.05) !important;
}

/* Checkbox styling - Primary teal when checked */
.checkbox-input {
    accent-color: var(--primary-teal) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 1.2rem !important;
    height: 1.2rem !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 4px !important;
    background-color: var(--bg-white) !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all var(--transition-fast) !important;
}

.checkbox-input:checked {
    background-color: var(--primary-teal) !important;
    border-color: var(--primary-teal) !important;
}

.checkbox-input:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
}

/* Better Mobile Responsiveness */
@media (max-width: 640px) {
    .w-full.max-w-6xl {
        margin: 0 1rem;
    }

    .px-6.sm\\:px-8.lg\\:px-10.xl\\:px-12 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ============================================
   MODAL OVERRIDES FOR LOGIN PAGE
   ============================================ */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

/* ============================================
   MODAL DESIGN STYLES - Match Project Modal
   ============================================ */
.all-modal-design {
    border-radius: 8px;
    background: #FFF;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.10);
}

.form-header h5 {
    color: #262A2E;
    font-size: 20px;
    font-weight: 500;
    margin-top: 5px;
    margin-bottom: 0%;
}

.form-header {
    align-items: center;
    border-bottom: none;
}

.form-footer {
    border-top: none;
}

.form-header a {
    color: #262A2E;
    border-radius: 50%;
}

.form-header a:hover {
    background-color: rgba(0, 0, 0, 0.175);
    transition: 0.6s;
    border-radius: 50%;
}

/* Close Icon Styling - Exact match from taskboard-teal-theme.css */
.fa-xmark,
.fa-solid.fa-xmark,
.modal-header .fa-xmark,
.modal-header .fa-solid.fa-xmark,
.modal-header a[data-bs-dismiss="modal"] .fa-xmark,
.modal-header a[data-bs-dismiss="modal"] .fa-solid.fa-xmark {
    font-size: 20px !important;
    color: var(--medium-text) !important;
    opacity: 0.7 !important;
    transition: all var(--transition-base) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer !important;
    margin: 0 !important;
}

/* Ensure the parent anchor/button doesn't interfere with styling */
.modal-header a[data-bs-dismiss="modal"],
.modal-header button[data-bs-dismiss="modal"] {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Hover effects for ALL close icons - Red color change and rotation */
a .fa-xmark:hover,
a .fa-solid.fa-xmark:hover,
a[data-bs-dismiss="modal"] .fa-xmark:hover,
a[data-bs-dismiss="modal"] .fa-solid.fa-xmark:hover,
.fa-xmark:hover,
.fa-solid.fa-xmark:hover,
.modal-header .fa-xmark:hover,
.modal-header .fa-solid.fa-xmark:hover,
.modal-header .close:hover,
.modal-header .btn-close:hover,
.modal-header a .fa-xmark:hover,
.modal-header a .fa-solid.fa-xmark:hover {
    opacity: 1 !important;
    color: var(--danger-red) !important;
    transform: rotate(90deg) !important;
}

.form-edit label {
    color: #262A2E;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-edit label span {
    color: #474E5D;
    font-size: 10px;
    font-weight: 400;
    margin-bottom: 0%;
}

.form-edit textarea {
    border-radius: 8px;
    border: 1px solid #C2C6CE;
    background: #FFF;
}

.form-edit textarea:focus {
    box-shadow: none;
}

.form-edit input {
    border-radius: 8px;
    border: 1px solid #C2C6CE;
    background: #FFF;
    /*padding: 6px 17px;*/
}

.form-edit input:focus {
    border: 1px solid #1ABEFD;
    box-shadow: none;
}

.form-edit h3 {
    color: #1ABEFD;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0%;
    text-align: start;
}

.form-edit .form-check .form-check-input {
    float: left;
    margin-left: -1.5em;
    padding: 0;
}

/* Modal Button Styles - Exact match from taskboard-teal-theme.css */
.btn.save-modal-btn,
.btn-primary,
.btn.cancel-modal-btn.save-modal-btn {
    background: var(--primary-teal) !important;
    border-color: var(--primary-teal) !important;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
    transition: all var(--transition-base);
    font-weight: 400;
    letter-spacing: 0.3px;
    color: #FFFFFF !important;
}

.btn.save-modal-btn:hover,
.btn-primary:hover,
.btn.cancel-modal-btn.save-modal-btn:hover {
    background: var(--primary-teal-dark) !important;
    border-color: var(--primary-teal-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);

}

.btn.save-modal-btn:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Cancel Buttons - Gray */
.btn.cancel-btn,
.btn.cancel-modal-btn {
    background: #6B7280 !important;
    border-color: #6B7280 !important;
    transition: all var(--transition-base);
    color: #FFFFFF !important;
    border-radius: 10px;
}

.btn.cancel-btn:hover,
.btn.cancel-modal-btn:hover {
    background: #4B5563 !important;
    border-color: #4B5563 !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Focus states */
.btn.cancel-modal-btn:focus,
.btn.save-modal-btn:focus {
    box-shadow: none;
}

/* ============================================
   TOASTR NOTIFICATION OVERRIDES - Preserve Original Design
   ============================================ */
/* Allow toastr to use its default styling */
.toast-success,
.toast-error,
.toast-info,
.toast-warning,
.toast {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px !important;
    font-family: inherit !important;
}

/* Preserve toastr icons */
.toast .toast-message::before,
.toast-success::before,
.toast-error::before,
.toast-info::before,
.toast-warning::before {
    display: inline-block !important;
    margin-right: 8px !important;
    font-family: 'toast' !important;
}

/* Ensure toastr close button works */
.toast .toast-close-button {
    opacity: 0.6 !important;
    color: inherit !important;
}

.toast .toast-close-button:hover {
    opacity: 1 !important;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
input:focus,
.checkbox-input:focus {
    outline: none !important;
}

button:focus {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    input {
        border-width: 2px;
        box-shadow: none !important;
    }

    input:focus {
        border-color: var(--primary-teal);
        box-shadow: none !important;
        outline: none !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .illustration-image img {
        animation: none;
    }
}