/*
-----------------------------------------------------------------
[Master Stylesheet]

Project:	AwA ERP SaaS
Version:	1.1
Last change:	17/11/2025
Primary use:    Authentication Pages (Login, Register)
-----------------------------------------------------------------
*/

:root {
    --primary-color: #1a237e;
    --accent-color: #00bfa5;
    --light-bg: #f4f7fc;
    --text-color: #2d3748;
    --text-light: #718096;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 191, 165, 0.25);
    --font-family: 'Cairo', 'Tajawal', sans-serif;
}

body.hold-transition {
    background: linear-gradient(135deg, #f4f7fc 0%, #e8f0f5 50%, #f0f5f8 100%);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    background-image: url('../img/common2.svg'), url('../img/common.svg');
    background-repeat: no-repeat, no-repeat;
    background-position:
        top -10% left -10%,
        bottom -10% right -10%;
    background-size: 30%, 30%;
    background-attachment: fixed;
    position: relative;
}

body.hold-transition::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 191, 165, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(26, 35, 126, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.hold-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(244, 247, 252, 0.8);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Card Styling */
.auth-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    animation: fadeIn 0.5s ease-out;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.auth-card .auth-header {
    flex-shrink: 0;
}

.auth-card .auth-form {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.auth-card::-webkit-scrollbar {
    width: 8px;
}

.auth-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.auth-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), #00897B);
    border-radius: 10px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.auth-logo {
    margin-bottom: 0.75rem;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    text-align: center;
}

.auth-logo a {
    display: inline-block;
    text-decoration: none;
}

.auth-logo img {
    max-width: 80px;
    height: auto;
    margin-bottom: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0;
}

/* Form Styling */
.auth-form .form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.auth-form .form-control {
    background-color: #f9faff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    height: 44px;
    padding: 0 1rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.auth-form .form-control:hover {
    border-color: rgba(0, 191, 165, 0.5);
}

.auth-form .form-control:focus {
    background-color: var(--card-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--shadow-color);
}

.auth-form .form-control.error {
    border-color: #f44336;
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.1);
}

.help-block {
    color: #f44336;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.password-field-wrapper {
    position: relative;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer !important;
    color: var(--text-light);
    padding: 6px;
    z-index: 100 !important;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    pointer-events: auto !important;
    background: transparent;
    border: none;
    outline: none;
}

.password-toggle-icon:hover,
.password-toggle-icon:focus,
.password-toggle-icon:active {
    color: var(--accent-color) !important;
    background-color: rgba(0, 191, 165, 0.1) !important;
    transform: translateY(-50%) scale(1.1);
    outline: none;
}

.password-toggle-icon i {
    font-size: 14px;
    pointer-events: none !important;
    display: block !important;
    line-height: 1;
}

.password-input-wrapper .form-control {
    padding-right: 45px;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #00897B);
    border: none;
    border-radius: 10px;
    height: 44px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #00897B, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 165, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Registration Page Specifics */
.register-card {
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.75rem 2rem;
}

.register-card .auth-header {
    flex-shrink: 0;
    order: -1;
}

.register-card .auth-form {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.register-card .form-group {
    margin-bottom: 1rem;
}

.register-card .form-control {
    height: 42px;
    font-size: 0.875rem;
    padding: 0 0.875rem;
}

/* تحسين ترتيب الحقول في المرحلة الأولى */
.step1-form-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.step1-form-grid .row {
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
}

.step1-form-grid .row:last-child {
    margin-bottom: 0;
}

.step1-form-grid .col-md-6,
.step1-form-grid .col-md-12 {
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
}

.step1-form-grid .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 70px;
    justify-content: flex-start;
}

.step1-form-grid .form-group label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    flex-shrink: 0;
}

.step1-form-grid .form-control {
    flex: 1;
    height: 42px;
    min-height: 42px;
}

/* محاذاة متساوية للحقول في نفس الصف */
.step1-form-grid .row .col-md-6 {
    align-items: stretch;
}

.step1-form-grid .row .col-md-6 .form-group {
    justify-content: flex-start;
}

.register-card::-webkit-scrollbar {
    width: 8px;
}

.register-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.register-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), #00897B);
    border-radius: 10px;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    list-style-type: none;
    padding: 0;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 0.4rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.4s ease;
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.step.active .step-icon {
    background: linear-gradient(135deg, var(--accent-color), #00897B);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--shadow-color);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-icon {
    background: linear-gradient(135deg, var(--primary-color), #283593);
    color: white;
}

.registration-step {
    display: none;
    animation: fadeIn 0.5s;
}

.registration-step.active {
    display: block;
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.step-buttons .btn {
    flex: 1;
    max-width: 180px;
    font-size: 0.875rem;
}

[dir="rtl"] .step-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .step-buttons .btn-primary {
    order: 1;
}

[dir="rtl"] .step-buttons .btn-secondary {
    order: 2;
}

.btn-secondary {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    border: none;
    color: var(--text-color);
    border-radius: 10px;
    height: 44px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #BDBDBD, #9E9E9E);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .register-card {
        max-width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 768px) {
    body.hold-transition {
        padding: 1rem;
        align-items: flex-start;
        min-height: 100vh;
    }
    .auth-card {
        padding: 1.5rem 1.25rem;
        width: 100%;
        margin-top: 0.5rem;
        max-height: 90vh;
    }
    .register-card {
        max-height: 90vh;
        padding: 1.5rem 1.25rem;
    }
    .step-label {
        display: none;
    }
    .step-indicator {
        margin-bottom: 1.5rem;
    }
    .auth-header {
        margin-bottom: 1.25rem;
    }
    .auth-logo {
        display: block !important;
        visibility: visible !important;
    }
    
    .auth-logo img {
        max-width: 60px;
        display: block !important;
        visibility: visible !important;
    }
    .auth-title {
        font-size: 1.25rem;
    }
    .auth-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
        max-height: 90vh;
    }
    .register-card {
        max-height: 90vh;
    }
}

/* ======================================================= */
/* ==== 🔧 Terms & Conditions Modal - Redesigned 🔧 ==== */
/* ======================================================= */
#tc_modal.modal {
    z-index: 10000 !important;
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow: auto !important;
    background: transparent !important;
}

#tc_modal.modal.show,
#tc_modal.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000 !important;
}

#tc_modal .modal-dialog {
    z-index: 10001 !important;
    position: relative;
    margin: 30px auto;
    max-width: 800px;
    width: 90%;
    pointer-events: auto !important;
}

#tc_modal .modal-content {
    z-index: 10002 !important;
    position: relative;
    pointer-events: auto !important;
    border-radius: 24px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 191, 165, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    width: 100%;
    background: #ffffff;
    border: none;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

#tc_modal .modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--accent-color) 0%, 
        #00897B 25%, 
        var(--accent-color) 50%, 
        #00897B 75%, 
        var(--accent-color) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 0%;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#tc_modal .modal-header {
    pointer-events: auto !important;
    position: relative;
    z-index: 10003 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 30px;
    border-bottom: none;
    background: linear-gradient(135deg, var(--accent-color) 0%, #00897B 50%, var(--accent-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

#tc_modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#tc_modal .modal-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

#tc_modal .modal-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#tc_modal .modal-icon-wrapper:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05) rotate(5deg);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

#tc_modal .modal-icon-wrapper i {
    font-size: 24px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

#tc_modal .modal-title {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

#tc_modal .modal-body {
    pointer-events: auto !important;
    position: relative;
    z-index: 10003 !important;
    padding: 35px 30px;
    max-height: 60vh;
    overflow-y: auto;
    background: #ffffff;
}

#tc_modal .modal-body::-webkit-scrollbar {
    width: 10px;
}

#tc_modal .modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
    margin: 10px 0;
}

#tc_modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), #00897B);
    border-radius: 10px;
    border: 2px solid #f5f5f5;
}

#tc_modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00897B, var(--accent-color));
}

#tc_modal .terms-content-wrapper {
    position: relative;
}

#tc_modal .terms-text-content {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.9;
    text-align: justify;
}

#tc_modal .terms-text-content h1,
#tc_modal .terms-text-content h2,
#tc_modal .terms-text-content h3,
#tc_modal .terms-text-content h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

#tc_modal .terms-text-content h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

#tc_modal .terms-text-content h2 {
    font-size: 1.3rem;
}

#tc_modal .terms-text-content h3 {
    font-size: 1.15rem;
}

#tc_modal .terms-text-content p {
    margin-bottom: 1.2rem;
    color: #4a5568;
}

#tc_modal .terms-text-content ul,
#tc_modal .terms-text-content ol {
    margin: 1rem 0;
    padding-right: 1.5rem;
}

#tc_modal .terms-text-content li {
    margin-bottom: 0.8rem;
    color: #4a5568;
}

#tc_modal .terms-text-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

#tc_modal .terms-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

#tc_modal .terms-placeholder i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

#tc_modal .terms-placeholder p {
    font-size: 1.1rem;
    margin: 0;
}

#tc_modal .modal-footer {
    pointer-events: auto !important;
    position: relative;
    z-index: 10003 !important;
    padding: 25px 30px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
}

#tc_modal .modal-header .close {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10004 !important;
    font-size: 24px;
    font-weight: 300;
    opacity: 0.85;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    border-radius: 50%;
    color: white;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

#tc_modal .modal-header .close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#tc_modal .modal-footer button {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10004 !important;
    border-radius: 12px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

#tc_modal .modal-footer .btn-primary,
#tc_modal .modal-footer .btn-close-modal {
    background: linear-gradient(135deg, var(--accent-color), #00897B);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
}

#tc_modal .modal-footer .btn-primary:hover,
#tc_modal .modal-footer .btn-close-modal:hover {
    background: linear-gradient(135deg, #00897B, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 165, 0.4);
}

#tc_modal .modal-footer .btn-primary i,
#tc_modal .modal-footer .btn-close-modal i {
    font-size: 0.9rem;
}

/* إزالة الـ backdrop تماماً - سنستخدم overlay مخصص */
.modal-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* إنشاء overlay مخصص للـ modal */
#tc_modal.modal.show::before,
#tc_modal.modal.in::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0, 191, 165, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(26, 35, 126, 0.08) 0%, transparent 50%),
        rgba(0, 0, 0, 0.5);
    z-index: 9999;
    pointer-events: auto;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(2px);
}

/* التأكد من أن الـ modal content أعلى من الـ overlay */
#tc_modal.modal.show .modal-dialog,
#tc_modal.modal.in .modal-dialog {
    z-index: 10001 !important;
    pointer-events: auto !important;
    position: relative;
}

#tc_modal.modal.show .modal-content,
#tc_modal.modal.in .modal-content {
    z-index: 10002 !important;
    pointer-events: auto !important;
    position: relative;
}

/* Ensure modal is clickable */
body.modal-open {
    overflow: hidden;
}

body.modal-open #tc_modal {
    pointer-events: auto !important;
}

/* إزالة أي backdrop متبقي */
body:not(.modal-open) .modal-backdrop,
.modal-backdrop:not(.show):not(.in) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Responsive modal for small screens */
@media (max-width: 768px) {
    #tc_modal .modal-dialog {
        margin: 15px;
        width: calc(100% - 30px);
        max-width: none;
    }
    
    #tc_modal .modal-content {
        border-radius: 20px;
    }
    
    #tc_modal .modal-header {
        padding: 22px 20px;
    }
    
    #tc_modal .modal-body {
        padding: 25px 20px;
        max-height: 70vh;
    }
    
    #tc_modal .modal-footer {
        padding: 20px;
    }
    
    #tc_modal .modal-icon-wrapper {
        width: 45px;
        height: 45px;
    }
    
    #tc_modal .modal-icon-wrapper i {
        font-size: 20px;
    }
    
    #tc_modal .modal-title {
        font-size: 1.4rem;
    }
    
    #tc_modal .modal-header .close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    #tc_modal .terms-text-content {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    #tc_modal .modal-dialog {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    #tc_modal .modal-content {
        border-radius: 16px;
    }
    
    #tc_modal .modal-header {
        padding: 20px 18px;
    }
    
    #tc_modal .modal-body {
        padding: 20px 18px;
        max-height: 75vh;
    }
    
    #tc_modal .modal-footer {
        padding: 18px;
    }
    
    #tc_modal .modal-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    #tc_modal .modal-icon-wrapper i {
        font-size: 18px;
    }
    
    #tc_modal .modal-title {
        font-size: 1.2rem;
    }
    
    #tc_modal .modal-header .close {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
    
    #tc_modal .modal-footer button {
        padding: 12px 24px;
        font-size: 0.95rem;
        min-width: 120px;
    }
    
    #tc_modal .terms-text-content {
        font-size: 0.9rem;
        line-height: 1.8;
    }
}

/* Fix password toggle icon positioning - ensure it's clickable */
.password-toggle-icon {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 100 !important;
}

.password-toggle-icon i {
    display: block !important;
    pointer-events: none !important;
}

/* Ensure password input wrapper doesn't block clicks */
.password-input-wrapper {
    position: relative;
    pointer-events: none;
}

.password-input-wrapper .form-control {
    pointer-events: auto;
}

.password-input-wrapper .password-toggle-icon {
    pointer-events: auto !important;
}

/* RTL support for password toggle icon */
[dir="rtl"] .password-toggle-icon {
    right: auto;
    left: 12px;
}

[dir="rtl"] .password-input-wrapper .form-control {
    padding-right: 0.875rem;
    padding-left: 45px;
}
