/* Mobile viewport fixes for browser UI overlap */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific fixes */
  .min-h-screen {
    min-height: -webkit-fill-available;
  }
}

@media screen and (max-width: 768px) {
  /* Mobile browser UI compensation */
  html {
    height: -webkit-fill-available;
  }
  
  body {
    min-height: -webkit-fill-available;
  }
  
  /* Ensure auth pages account for mobile browser chrome */
  .min-h-screen {
    min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  
  /* Add fixed padding for mobile auth pages */
  .min-h-screen > div:first-child {
    padding-top: 36px !important;
  }
}

/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600&family=Poppins:wght@400;500;600;700&display=swap');

/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    height: 100%;
}

.sidebar-menu-selected {
    background-color: #202A35 !important;
    border-radius: 6px !important;
    border: 2px solid #007BFF !important;
}

.sidebar-menu-selected img {
    filter: brightness(0) invert(1);
}

body {
    font-family: 'Poppins', sans-serif !important;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    background-color: #F4F4F4;
    height: 100%;
    font-size: 14px !important;
}

.main {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    position: relative;
    width: 100%;
    height: 100%;
}

.myContainer {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left Panel */
.left-panel {
    width: 620px;
    height: 100vh;
    padding: 48px 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    overflow-y: auto;
}

.form-content {
    height: 100%;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo:hover {
    text-decoration: none;
}

.logo img {
    width: 32px;
    height: 32px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

/* Heading */
.login-form h2,
.create-account-form h2 {
    font-weight: 600;
    font-size: 30px;
    color: #333333;
    margin-bottom: 8px;
}

.login-form p,
.create-account-form p {
    font-size: 16px;
    color: #898989;
}

/* Social login buttons */
.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    margin-bottom: 16px;
}

.social-button img {
    width: 24px;
    height: 24px;
}

.social-button:hover {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: #6B7280;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #E5E7EB;
    margin: 0 16px;
}

/* Form fields */
.form-content label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 8px;
}

.form-content input[type="email"],
.form-content input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background-color: #ffffff;
    transition: border-color 0.2s;
    margin-bottom: 24px;
}

.form-content input[type="email"]::placeholder,
.form-content input[type="password"]::placeholder {
    color: #9CA3AF;
}

.form-content input[type="email"]:focus,
.form-content input[type="password"]:focus {
    outline: none;
    border-color: #2563EB;
}

/* Password visibility toggle */
.password-container {
    position: relative;
}

.password-container input[type="password"] {
    padding-right: 40px;
}

.password-container .toggle-password {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Styling for the eye icon */
.password-container .toggle-password img {
    width: 15px;
    height: 10px;
    opacity: 0.5;
}

/* Options (Remember me and Forgot Password) */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #4B5563;
    margin: 0;
}

.options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
}

.forgot-password {
    font-size: 14px;
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-button,
.continue-button {
    width: 100%;
    padding: 14px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 24px;
}

.continue-button {
    margin-top: 10px;
}

.login-button:hover,
.continue-button:hover {
    background-color: #1D4ED8;
}

.main-1content {
    overflow-y: auto;
    background-color: #F4F4F4;
    object-fit: fill;
    width: 100%;
    min-height: fit-content;
}

/* Progress Indicator for Create Account */
.progress-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.progress-dot {
    width: 10px;
    height: 10px;
    background-color: #d3d3d3;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.progress-dot.active {
    background-color: #2563EB;
}

/* Footer text */
.footer-text {
    font-size: 14px;
    color: #666;
    margin-top: 30px;
    text-align: left;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
}


.footer-text img {
    width: 20px;
    height: auto;
    margin-right: 8px;
}

.animation-placeholder {
    width: 100%;
    height: 100%;
}

.animation-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Registration Form-Specific Styles */

/* Registration Heading Spacing */
.create-account-form h2 {
    font-size: 30px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    padding-top: 20px; /* Extra padding above the heading */
}

/* Social Signup Buttons Specific to Register Page */
.register-social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    margin-bottom: 16px;
}

.register-social-button img {
    width: 24px;
    height: 24px;
}

.register-social-button:hover {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
}


/* Progress Bar for Multi-Step Form */
.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 34px;
    width: 400px;
    height: 6px;
    background-color: transparent; /* Removes default background */
}

.progress-bar-step {
    flex-grow: 1;
    height: 100%;
    background-color: #E5E7EB;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-right: 4px; /* Add space between steps */
}

.progress-bar-step:last-child {
    margin-right: 0; /* No margin on the last step */
}

.progress-bar-step.active {
    background-color: #2563EB;
}

.progress-bar-step.active.animating {
    background-color: #E5E7EB;
    position: relative;
    overflow: hidden;
}

.progress-bar-step.active.animating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: #2563EB;
    animation: fillProgress 2s infinite;
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0% { opacity: 1; transform: scaleX(1); }
    50% { opacity: 0.6; transform: scaleX(1.05); }
    100% { opacity: 1; transform: scaleX(1); }
}

.pulsate {
    animation: pulse 0.8s infinite ease-in-out;
}


/* Continue Button Specific to Register Page */
.continue-button {
    width: 100%;
    padding: 14px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 24px;
}

.form-step .continue-button {
    margin-bottom: auto; /* Adjust spacing here to add space before the progress bar */
}

.continue-button:hover {
    background-color: #1D4ED8;
}

/* Back Button Style */
.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #6B7280;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 12px; /* Space above the back button */
    margin-bottom: 24px; /* Space below the back button to separate it from "Already have an account?" */
    text-decoration: none;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    transition: color 0.3s;
}

.back-button svg.back-icon {
    height: auto;
    transition: transform 0.3s, filter 0.3s; /* Smooth transitions for hover effect */
}

/* Hover effect for back button */
.back-button:hover {
    color: #2563EB;
}

.back-button:hover svg.back-icon {
    transform: translateX(-4px); /* Moves the icon slightly left on hover */
}

/* Consistent form field styling for other steps */
.form-content input[type="email"],
.form-content input[type="password"],
.form-content input[type="tel"],
.form-content input[type="text"],
.form-content input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background-color: #ffffff;
    transition: border-color 0.2s;
    margin-bottom: 24px;
}

.form-content input[type="tel"]::placeholder,
.form-content input[type="text"]::placeholder,
.form-content input[type="number"]::placeholder {
    color: #9CA3AF;
}

.form-content input[type="tel"]:focus,
.form-content input[type="text"]:focus,
.form-content input[type="number"]:focus {
    outline: none;
    border-color: #2563EB;
}

/* Verification code input styling */
#verification-code {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

#verification-code input[type="text"] {
    width: 45px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 20px;
    color: #111827;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

@media (max-width: 768px) {
    #verification-code input[type="text"] {
        width: 35px;
        padding: 10px 6px;
        font-size: 16px;
    }
}

#verification-code input[type="text"]:focus {
    outline: none;
    border-color: #2563EB;
}

.phone-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 24px;
    background-color: #ffffff;
    font-size: 14px;
    color: #111827;
}

.country-flag {
    width: 24px;
    height: 16px;
}

.country-code {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #111827;
}

.country-code:focus {
    outline: none;
}

#phone-number {
    border: none;
    outline: none;
    flex-grow: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #111827;
}

#phone-number::placeholder {
    color: #9CA3AF;
}

.terms-conditions a {
    color: #344054;
    text-decoration: underline;
    font-weight: 400;
}

.terms-conditions a:hover {
    color: #000000; /* Optional: Change color on hover */
}

.password-match-error {
    font-size: 14px;
    margin-top: 8px;
    color: #EF4444; /* Red for non-matching */
    transition: color 0.3s;
}

.password-match-error.valid {
    color: #22C55E; /* Green for matching */
}

/* Sidebar Styling */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Container */
.icon-sidebar {
    width: 80px;
    background-color: #f4f5f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
    font-family: 'Poppins', sans-serif;
}

/* Sidebar Sections */
.sidebar {
    /*position: relative;*/
    margin-left: 80px;
    bottom: 0;
    top: 0px;
    left: 80px;
    overflow-x: hidden;
    background-color: #202A35;
    width: auto;
    min-width: 18%;
    z-index: 10;
    padding: 32px 16px 8px;
    color: #FFFFFF;
    transition: margin-left 0.5s ease; /* Add transition property */
}
.sidebar-top, .sidebar-middle, .sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.sidebar-divider {
    width: 40px;
    height: 1px;
    background-color: #ddd;
    margin: 15px 0;
}

/* Enhanced Sidebar Icons */
.sidebar-link {
    text-transform: lowercase;
    font-weight: 500;
    color: #fff;
}
.sidebar-link span::first-letter {
    text-transform: uppercase;
}

.sidebar-icon img, .sidebar-link img {
    width: 26px;
    height: 26px;
    transition: all 0.3s ease;
}

/* Hover Effects */
.sidebar-icon:hover, .sidebar-link:hover {
    background-color: #192129;
}

/* Active States */
.sidebar-icon.active, .sidebar-link.active, .active_accordion {
    background-color: rgba(0, 123, 255, 0.1);
    border: 2px solid #007BFF;
}

.sidebar-icon.active img, .sidebar-link.active img {
    filter: brightness(0) invert(1);
}

/* Pressed Effect */
.sidebar-icon:active, .sidebar-link:active {
    transform: scale(0.95);
}

/* Indicator for active state */
.sidebar-icon.active::after, .sidebar-link.active::after {
    /*content: '';*/
    position: absolute;
    right: -8px;
    width: 4px;
    height: 20px;
    background-color: #a9b2c8;
    border-radius: 4px 0 0 4px;
}

/* Remove focus outline but keep it for keyboard navigation */
.sidebar-icon:focus, .sidebar-link:focus {
    outline: none;
}

.sidebar-icon:focus-visible, .sidebar-link:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}
.sidebar-option {
    display: block;
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    color: #A0AEC0;
    text-align: left;
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
    margin-bottom: 10px;
    text-decoration: none; /* Removes the underline */
}

/* Remove underline and visited color on links within sidebar options */
/* Make the rules more specific and comprehensive */
.sidebar-option,
.sidebar-option a,
.sidebar-option a:link,
.sidebar-option a:visited,
.sidebar-option a:hover,
.sidebar-option a:active {
    text-decoration: none !important; /* Force remove underline */
    color: #A0AEC0; /* Default color */
}

/* Hover state for both the button and its link */
.sidebar-option:hover,
.sidebar-option.active,
.sidebar-option:hover a,
.sidebar-option.active a {
    background-color: #2D3748;
    color: #FFFFFF;
    text-decoration: none !important;
}

/*Commons Styles */

.text-dark-grey {
    color: #333333 !important;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}

.grid-container-title {
    font-size: 16px !important;
    color: #333 !important;
}

.grid-container-text {
    font-size: 14px !important;
    color: #717171 !important;
}

.default-container {
    background-color: #fff;
    border-radius: 12px;
    height: auto;
    box-shadow: rgba(13, 24, 40, 0.1) 0px 1px 3px;
}

.small-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
    text-align: center;
    padding: 6px 12px;
    border-radius: 8px;
}

.default-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none !important;
    text-align: center;
    padding: 8px 28px;
    border-radius: 8px;
}

.large-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
    text-align: center;
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 8px;
}

.white-button {
    background-color: #fff !important;
    transition: 250ms all;
    color: #333333 !important;
    border: none;
}

.white-button:hover {
    background-color: #E0E0E0 !important;
    color: #333333 !important;
}


.outline-button {
    font-weight: 500;
    background-color: #fff !important;
    transition: 250ms all;
    color: #333333 !important;
    border: none;
    border: 1px solid #DFE4EA;
}

.outline-button:disabled {
    cursor: not-allowed;
    opacity: 0.50;
}

.outline-button:hover {
    background-color: #E0E0E0 !important;
}

.outline-button:disabled:hover {
    background-color: #fff !important;
}

.blue-button:hover {
    cursor: pointer;
    background-color: #1F3A93 !important;
}

.blue-button {
    background-color: #007BFF !important;
    transition: 250ms all;
    color: #fff !important;
    border: none;
}

.blue-button:hover {
    cursor: pointer;
    background-color: #1F3A93 !important;
}

.red-button {
    background-color: #ca1919 !important;
    transition: 250ms all;
    color: #fff !important;
    border: none;
}

.red-button:hover {
    cursor: pointer;
    background-color: #ab1818 !important;
}
.red-outline-button {
    background-color: transparent !important;
    transition: 250ms all;
    color: #B62E2E !important;
    border: solid 1px #B62E2E;
}

.red-outline-button:hover {
    cursor: pointer;
    background-color: #B62E2E !important;
    color: white !important;
}

/*when button is disabled, and it is hovered, it should not change color*/
.blue-button:disabled {
    background-color: #babbc0 !important;
}   
.blue-button:disabled:hover {
    background-color: #babbc0 !important;
}   

.blue-button:disabled {
    border: 1px solid #DFE4EA;
    background-color: #babbc0;
    cursor: not-allowed;
}

.button-spinner-white {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
  }

/* Generic Tooltip Implementation */
.has-tip {
    position: relative;
}

/* Ensure tooltips on disabled elements are fully visible */
.has-tip:disabled:hover::after,
.has-tip[disabled]:hover::after {
    opacity: 1 !important;
}

/* Tooltip variations for different positions */
.has-tip.tip-top:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tipFadeInTop 0.15s ease-out;
    margin-bottom: 4px;
}

.has-tip.tip-bottom:hover::after {
    content: attr(data-tip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tipFadeInBottom 0.15s ease-out;
    margin-top: 4px;
}

.has-tip.tip-left:hover::after {
    content: attr(data-tip);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tipFadeInLeft 0.15s ease-out;
    margin-right: 4px;
}

.has-tip.tip-right:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tipFadeInRight 0.15s ease-out;
    margin-left: 4px;
}

@keyframes tipFadeInTop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes tipFadeInBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes tipFadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(4px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes tipFadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}
