/* ============================================
   AUTH SCREENS STYLES (Sign In / Log In)
   ============================================ */

/* Auth Page Container */
.psp-auth-page {
    /* min-height: 100vh; */
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Auth Header */
.psp-auth-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    gap: 10px;
}

.psp-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1A1A2E;
}

.psp-back-btn svg {
    width: 18px;
    height: 18px;
}

.psp-back-btn:hover {
    background: #F3F4F6;
}

.psp-auth-title {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A2E;
    margin: 0;
}

/* Doctor Banner */
.psp-doctor-banner {
    margin: 0 8px 15px;
    padding: 20px;
    border-radius: 16px;
    background-image: url('../images/doctor-banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.psp-banner-text {
    position: relative;
    z-index: 1;
}

.psp-banner-text span {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-bottom: 4px;
}

.psp-banner-text h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
}

.psp-banner-text p {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin: 0;
}

.psp-add-doctor-btn {
    padding: 10px 16px;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1A1A2E;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.psp-add-doctor-btn:hover {
    background: #F3F4F6;
}

/* Auth Form Container */
.psp-auth-content {
    flex: 1;
    padding: 0 16px 16px;
    overflow-y: auto;
}

.psp-form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A2E;
    margin-bottom: 16px;
}

/* Form Group */
.psp-form-group {
    margin-bottom: 12px;
}

.psp-form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #1A1A2E;
    margin-bottom: 5px;
}

.psp-form-label .required {
    color: #EF4444;
}

/* Form Input */
.psp-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
    color: #1A1A2E;
    background: #ffffff;
    transition: all 0.3s ease;
}

.psp-form-input:focus {
    outline: none;
    border-color: #0D7377;
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

.psp-form-input::placeholder {
    color: #9CA3AF;
}

/* Validation Error Styles */
.psp-form-group.has-error .psp-form-input,
.psp-form-group.has-error .psp-form-select,
.psp-form-input.is-invalid,
.psp-form-select.is-invalid {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

.psp-form-group.has-error .psp-form-input:focus,
.psp-form-group.has-error .psp-form-select:focus,
.psp-form-input.is-invalid:focus,
.psp-form-select.is-invalid:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.psp-field-error {
    display: block;
    font-size: 12px;
    color: #EF4444;
    margin-top: 6px;
    padding-left: 2px;
}

/* Alert Messages */
.psp-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.psp-alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}

.psp-alert-success {
    background-color: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #16A34A;
}

.psp-error-list {
    margin: 0;
    padding-left: 18px;
}

.psp-error-list li {
    margin-bottom: 4px;
}

.psp-error-list li:last-child {
    margin-bottom: 0;
}

/* Form Select */
.psp-form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
    color: #1A1A2E;
    background: #ffffff;
    appearance: none;
    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='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.psp-form-select:focus {
    outline: none;
    border-color: #0D7377;
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

/* Gender Options */
.psp-gender-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.psp-gender-option {
    flex: 1;
    min-width: 70px;
}

.psp-gender-option input {
    display: none;
}

.psp-gender-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 12px;
    color: #1A1A2E;
    cursor: pointer;
    transition: all 0.3s ease;
}

.psp-gender-option input:checked + label {
    border-color: #0481C6;
    background: linear-gradient(90deg, #0481C6, #004F79);
    color: #ffffff;
}

.psp-gender-option label:hover {
    border-color: #0481C6;
}

/* Form Helper Text */
.psp-form-helper {
    font-size: 12px;
    color: #0D7377;
    margin-top: 8px;
}

/* Password Input Wrapper */
.psp-password-wrapper {
    position: relative;
}

.psp-password-wrapper .psp-form-input {
    padding-right: 48px;
}

.psp-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
}

/* Auth Submit Button */
.psp-auth-footer {
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
}

.psp-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(90deg, #0481C6, #004F79);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.psp-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.psp-submit-btn:active {
    transform: translateY(0);
}

/* Login Page Specific */
.psp-login-avatar {
    text-align: center;
    padding: 20px 0;
}

.psp-login-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}

.psp-login-avatar span {
    display: block;
    font-size: 12px;
    color: #6B7280;
}

.psp-login-title {
    text-align: center;
    margin-bottom: 20px;
}

.psp-login-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1A1A2E;
    margin: 0 0 6px;
}

.psp-login-title p {
    font-size: 12px;
    color: #6B7280;
    margin: 0;
}

/* Create Account Link */
.psp-create-account {
    text-align: center;
    margin: 16px 0;
    font-size: 12px;
    color: #6B7280;
}

.psp-create-account a {
    color: #0D7377;
    font-weight: 600;
    text-decoration: none;
}

.psp-create-account a:hover {
    text-decoration: underline;
}

/* Install as App Button */
.psp-install-btn {
    display: block;
    width: fit-content;
    margin: 0 auto 20px;
    padding: 10px 24px;
    background: #0D7377;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.psp-install-btn:hover {
    opacity: 0.9;
}

/* Login Page - Back Button Wrapper */
.psp-login-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
}

.psp-login-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1A1A2E;
}

.psp-login-back-btn:hover {
    background: #F3F4F6;
}

/* Login Form Styles */
.psp-login-form-label {
    font-size: 13px;
    color: #1A1A2E;
}

.psp-login-form-input {
    padding: 11px 14px;
    font-size: 14px;
    border-color: #E5E7EB;
}

.psp-login-form-input-password {
    padding-right: 48px;
}

.psp-login-error-text {
    font-size: 12px;
}

.psp-login-error-box {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
}

.psp-login-error-box .psp-login-error-text {
    font-size: 13px;
    line-height: 1.4;
}

.psp-login-otp-box {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.psp-login-otp-text {
    font-size: 13px;
    color: #92400E;
    margin: 0;
}

.psp-send-otp-btn {
    background: linear-gradient(90deg, #0481C6, #004F79);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.psp-send-otp-btn:hover {
    opacity: 0.9;
}

.psp-send-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.psp-login-link-text {
    font-size: 12px;
    color: #6B7280;
}

.psp-login-link {
    color: #0D7377;
}

/* Login Footer */
.psp-login-footer {
    padding: 8px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
}

/* ============================================
   SUCCESS SCREEN STYLES
   ============================================ */

.psp-success-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 20px;
    text-align: center;
}

.psp-success-icon {
    width: 180px;
    height: 180px;
    margin-bottom: 32px;
    position: relative;
}

.psp-success-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Success badge for GIF */
.psp-success-badge {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    position: relative;
}

.psp-success-badge .psp-success-gif {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.psp-success-badge svg {
    width: 60px;
    height: 60px;
    color: #ffffff;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.psp-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #1A1A2E;
    margin: 0 0 12px;
}

.psp-success-subtitle {
    font-size: 16px;
    color: #6B7280;
    margin: 0 0 40px;
}

.psp-success-btn {
    padding: 16px 48px;
    background: linear-gradient(90deg, #0481C6, #004F79);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.psp-success-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ============================================
   BOTTOM DRAWER STYLES
   ============================================ */

/* Drawer Overlay */
.psp-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.psp-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Bottom Drawer */
.psp-bottom-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.psp-bottom-drawer.active {
    transform: translateY(0);
    visibility: visible;
}

/* Drawer Handle */
.psp-drawer-handle {
    width: 40px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 2px;
    margin: 12px auto;
}

/* Drawer Banner */
.psp-drawer-banner {
    background: linear-gradient(135deg, #0D7377 0%, #14A3A8 100%);
    height: 80px;
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0 20px;
    border-radius: 16px;
}

.psp-drawer-avatar {
    position: absolute;
    bottom: -30px;
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid #ffffff;
}

/* Drawer Title Section */
.psp-drawer-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 50px 20px 20px;
}

.psp-drawer-title-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #0D7377, #14A3A8);
    border-radius: 2px;
}

.psp-drawer-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A2E;
    margin: 0;
}

/* Drawer Body */
.psp-drawer-body {
    padding: 0 20px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Drawer Footer */
.psp-drawer-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #E5E7EB;
    background: #ffffff;
}

.psp-drawer-btn {
    flex: 1;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.psp-drawer-btn-cancel {
    background: #ffffff;
    color: #1A1A2E;
    border: 1px solid #E5E7EB;
}

.psp-drawer-btn-cancel:hover {
    background: #F3F4F6;
}

.psp-drawer-btn-add {
    background: linear-gradient(90deg, #0481C6, #004F79);
    color: #ffffff;
}

.psp-drawer-btn-add:hover {
    opacity: 0.9;
}

.psp-drawer-btn-continue {
    background: linear-gradient(90deg, #0481C6, #004F79);
    color: #ffffff;
}

/* ============================================
   ADD DOCTOR DRAWER - CURVED HEADER STYLES
   ============================================ */

.psp-add-doctor-drawer {
    border-radius: 40px 40px 0 0;
    overflow: visible;
    padding-top: 60px;
    background: #ffffff;
}

.psp-add-doctor-drawer .psp-drawer-title-section {
    padding-top: 10px;
}

/* Curved Header Container */
.psp-drawer-curved-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.psp-drawer-curved-header .psp-drawer-handle {
    margin-bottom: 5px;
}

/* Doctor Avatar with clipart image - positioned at the curve peak */
.psp-add-doctor-drawer .psp-drawer-doctor-avatar {
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Circular background behind the avatar to create dome effect */
.psp-add-doctor-drawer .psp-drawer-doctor-avatar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: #ffffff;
    border-radius: 50%;
    z-index: -1;
}

.psp-add-doctor-drawer.active .psp-drawer-doctor-avatar {
    display: flex;
}

.psp-drawer-doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* ============================================
   OTP VERIFICATION STYLES
   ============================================ */

.psp-otp-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.psp-otp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
}

/* OTP Icon */
.psp-otp-icon-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 40px auto 32px;
}

.psp-otp-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Decorative dots */
.psp-otp-dots {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.psp-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #0D7377;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

.psp-dot:nth-child(2) {
    width: 8px;
    height: 8px;
    animation-delay: 0.3s;
}

.psp-dot:nth-child(3) {
    width: 5px;
    height: 5px;
    animation-delay: 0.6s;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* OTP Title */
.psp-otp-title {
    font-size: 28px;
    font-weight: 700;
    color: #1A1A2E;
    margin: 0 0 16px;
}

/* OTP Subtitle */
.psp-otp-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin: 0 0 32px;
    line-height: 1.5;
    max-width: 300px;
}

.psp-otp-phone {
    display: block;
    font-weight: 600;
    color: #1A1A2E;
    margin-top: 4px;
}

/* OTP Input Boxes */
.psp-otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.psp-otp-input {
    width: 60px;
    height: 60px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    color: #1A1A2E;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
}

.psp-otp-input:focus {
    outline: none;
    border-color: #0D7377;
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

.psp-otp-input::placeholder {
    color: #D1D5DB;
}

/* Resend OTP */
.psp-otp-resend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.psp-otp-resend span {
    font-size: 14px;
    color: #6B7280;
}

.psp-resend-link {
    font-size: 14px;
    font-weight: 600;
    color: #0481C6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.psp-resend-link:hover {
    text-decoration: underline;
}

/* ============================================
   TABLET & DESKTOP RESPONSIVE STYLES (768px+)
   ============================================ */

@media (min-width: 768px) {
    .psp-auth-page {
        /* max-width: 500px;
        margin: 0 auto; */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    }

    .psp-auth-footer {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Bottom Drawer - Centered */
    .psp-bottom-drawer {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }

    .psp-bottom-drawer.active {
        transform: translateX(-50%) translateY(0);
    }

    /* OTP Page */
    .psp-otp-page {
        max-width: 500px;
        margin: 0 auto;
    }
}
