/* Filament Breezy 2FA CSS Classes - Original Values for Override */
/* You can modify these values as needed */

/* ====================================================================== */
/* RECOVERY CODES - Original Breezy Classes */
/* ====================================================================== */

/* Recovery codes container */

.px-4.space-y-3 {
    padding-left: 1rem;
    padding-right: 1rem;
    /* space-y-3 children have margin-top: 0.75rem */
}

.px-4.space-y-3>*+* {
    margin-top: 0.75rem;
}

/* Individual recovery code spans */
span.inline-flex.items-center.p-1.text-xs.font-medium.text-gray-800.dark\:text-gray-400.bg-gray-100.rounded-full.dark\:bg-gray-900 {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    color: #1f2937;
    background-color: #f3f4f6;
    border-radius: 9999px;
}

/* Dark mode for recovery codes */
.dark span.inline-flex.items-center.p-1.text-xs.font-medium.text-gray-800.dark\:text-gray-400.bg-gray-100.rounded-full.dark\:bg-gray-900 {
    color: #9ca3af;
    background-color: #111827;
}

/* ====================================================================== */
/* ALERT SECTIONS - Original Breezy Classes */
/* ====================================================================== */

/* Danger alert styling (2FA required alert) */
.mb-2.p-4.rounded.bg-custom-50.dark\:bg-custom-400\/10.ring-1.ring-custom-100.dark\:ring-custom-500\/70 {
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 0.375rem;
    ring-width: 1px;
}

/* Success/Primary alert styling */
.bg-primary-50.dark\:bg-primary-400\/10.space-y-2.ring-1.ring-primary-100.dark\:ring-primary-500\/70 {
    background-color: #eff6ff;
    ring-width: 1px;
    /* space-y-2 children have margin-top: 0.5rem */
}

.bg-primary-50.dark\:bg-primary-400\/10.space-y-2.ring-1.ring-primary-100.dark\:ring-primary-500\/70>*+* {
    margin-top: 0.5rem;
}

.dark .bg-primary-50.dark\:bg-primary-400\/10.space-y-2.ring-1.ring-primary-100.dark\:ring-primary-500\/70 {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Alert flex containers */
.flex {
    display: flex;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.ml-3 {
    margin-left: 0.75rem;
}

/* Alert text styling */
.text-sm.font-medium.text-custom-800.dark\:text-white {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #1f2937;
}

.dark .text-sm.font-medium.text-custom-800.dark\:text-white {
    color: #ffffff;
}

.text-sm.font-medium.text-primary-800.dark\:text-white {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #1e3a8a;
}

.dark .text-sm.font-medium.text-primary-800.dark\:text-white {
    color: #ffffff;
}

/* ====================================================================== */
/* HEADINGS AND STATUS - Original Breezy Classes */
/* ====================================================================== */

/* Status headings */
h3.flex.items-center.gap-2.text-lg.font-medium {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 500;
}

/* Description text */
p.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.pt-2.text-sm {
    padding-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* ====================================================================== */
/* LAYOUT CONTAINERS - Original Breezy Classes */
/* ====================================================================== */

/* Main flex containers */
.flex.justify-between.mt-3 {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.flex.mt-3.space-x-4 {
    display: flex;
    margin-top: 0.75rem;
    /* space-x-4 children have margin-left: 1rem */
}

.flex.mt-3.space-x-4>*+* {
    margin-left: 1rem;
}

/* Space utility classes */
.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

/* ====================================================================== */
/* FORM ELEMENTS - Original Breezy Classes */
/* ====================================================================== */

/* Form container */
form.space-y-6 {
    /* space-y-6 children have margin-top: 1.5rem */
}

form.space-y-6>*+* {
    margin-top: 1.5rem;
}

/* Input field styling */
input.w-full.py-1.px-3.rounded-lg.bg-gray-100.border-gray-200.dark\:bg-gray-700.dark\:border-gray-500 {
    width: 100%;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.dark input.w-full.py-1.px-3.rounded-lg.bg-gray-100.border-gray-200.dark\:bg-gray-700.dark\:border-gray-500 {
    background-color: #374151;
    border-color: #6b7280;
}

/* ====================================================================== */
/* CLIPBOARD COMPONENT - Original Breezy Classes */
/* ====================================================================== */

/* Clipboard container */
.inline-block.text-xs {
    display: inline-block;
    font-size: 0.75rem;
    line-height: 1rem;
}

/* ====================================================================== */
/* FILAMENT BUTTON CLASSES - Original Values */
/* ====================================================================== */

/* Base button class */
.fi-btn {
    /* Filament's base button styles */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-weight: 500;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Primary button */
.fi-btn-primary {
    /* Filament's primary button styles */
}

/* Button with danger color */
.fi-btn[color="danger"] {
    /* Filament's danger button styles */
}

/* Button sizing */
.w-full {
    width: 100%;
}

/* ====================================================================== */
/* UTILITY CLASSES - Original Tailwind Values */
/* ====================================================================== */

/* Margin utilities */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.ml-3 {
    margin-left: 0.75rem;
}

/* Padding utilities */
.p-1 {
    padding: 0.25rem;
}

.p-4 {
    padding: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.pt-2 {
    padding-top: 0.5rem;
}

/* Display utilities */
.inline-flex {
    display: inline-flex;
}

.flex {
    display: flex;
}

.inline-block {
    display: inline-block;
}

/* Flexbox utilities */
.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

/* Gap utilities */
.gap-2 {
    gap: 0.5rem;
}

/* Width utilities */
.w-full {
    width: 100%;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

/* Typography utilities */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-medium {
    font-weight: 500;
}

/* Color utilities */
.text-gray-800 {
    color: #1f2937;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

/* Dark mode colors */
.dark .text-gray-400 {
    color: #9ca3af;
}

.dark .bg-gray-900 {
    background-color: #111827;
}

.dark .bg-gray-700 {
    background-color: #374151;
}

.dark .border-gray-500 {
    border-color: #6b7280;
}

.dark .text-white {
    color: #ffffff;
}

/* Border radius utilities */
.rounded {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Ring utilities */
.ring-1 {
    ring-width: 1px;
}

/* Background utilities */
.bg-custom-50 {
    /* Dynamic color based on Filament's custom color system */
}

.bg-primary-50 {
    background-color: #eff6ff;
}

/* Dark mode background utilities */
.dark .bg-custom-400\/10 {
    /* Dynamic color with 10% opacity */
}

.dark .bg-primary-400\/10 {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Ring color utilities */
.ring-custom-100 {
    /* Dynamic ring color */
}

.ring-primary-100 {
    ring-color: #dbeafe;
}

/* Dark mode ring utilities */
.dark .ring-custom-500\/70 {
    /* Dynamic ring color with 70% opacity */
}

.dark .ring-primary-500\/70 {
    ring-color: rgba(59, 130, 246, 0.7);
}

/* ====================================================================== */
/* CUSTOM PASSWORD STRENGTH STYLES */
/* ====================================================================== */

/* Password helper text container */
.password-helper-container {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #eff6ff;
    border-radius: 0.5rem;
    border: 1px solid #bfdbfe;
}

.dark .password-helper-container {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Helper text title */
.password-helper-title {
    font-weight: 500;
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.dark .password-helper-title {
    color: #93c5fd;
}

/* Helper text list */
.password-requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #1d4ed8;
    font-size: 0.875rem;
}

.dark .password-requirements-list {
    color: #93c5fd;
}

.password-requirements-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.password-requirements-list li.requirement-met {
    color: #059669;
}

.dark .password-requirements-list li.requirement-met {
    color: #34d399;
}

.password-requirements-list li.requirement-unmet {
    color: #6b7280;
}

.dark .password-requirements-list li.requirement-unmet {
    color: #9ca3af;
}

/* Requirement icons */
.requirement-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* Password strength indicator */
.password-strength-indicator {
    margin-top: 0.5rem;
    height: 0.25rem;
    background-color: #e5e7eb;
    border-radius: 0.125rem;
    overflow: hidden;
}

.dark .password-strength-indicator {
    background-color: #374151;
}

.strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 0.125rem;
}

.strength-very-weak {
    width: 20%;
    background-color: #dc2626;
}

.strength-weak {
    width: 40%;
    background-color: #ea580c;
}

.strength-medium {
    width: 60%;
    background-color: #d97706;
}

.strength-strong {
    width: 80%;
    background-color: #16a34a;
}

.strength-very-strong {
    width: 100%;
    background-color: #059669;
}

/* Password tip */
.password-tip {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #4338ca;
    display: flex;
    align-items: center;
}

.dark .password-tip {
    color: #a5b4fc;
}

.password-tip-icon {
    margin-left: 0.25rem;
    font-size: 0.875rem;
}

/* Security tips section */
.security-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

.dark .security-tips {
    background-color: #1f2937;
}

.security-tips-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
}

.dark .security-tips-title {
    color: #d1d5db;
}

.security-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-tips-list li {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.dark .security-tips-list li {
    color: #9ca3af;
}

/* Password generator button styling */
.password-generator-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.password-generator-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.password-generator-btn:active {
    transform: translateY(0);
}

/* Animation for generated password */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-generated {
    animation: fadeInUp 0.3s ease-out;
}

/* RTL Support for Arabic */
[dir="rtl"] .password-requirements-list li {
    flex-direction: row-reverse;
}

[dir="rtl"] .requirement-icon {
    margin-left: 0;
    margin-right: 0.5rem;
}

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

[dir="rtl"] .password-tip-icon {
    margin-left: 0;
    margin-right: 0.25rem;
}

/* Success state for password input */
.password-input-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 1px #10b981;
}

.dark .password-input-success {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 1px #34d399;
}

/* Error state for password input */
.password-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444;
}

.dark .password-input-error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 1px #f87171;
}

/* Pulse animation for validation feedback */
@keyframes pulse-success {

    0%,
    100% {
        box-shadow: 0 0 0 1px #10b981;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4);
    }
}

@keyframes pulse-error {

    0%,
    100% {
        box-shadow: 0 0 0 1px #ef4444;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4);
    }
}

.password-validation-success {
    animation: pulse-success 1s ease-in-out;
}

.password-validation-error {
    animation: pulse-error 1s ease-in-out;
}

/* ====================================================================== */
/* PASSWORD REVEAL BUTTON STYLING */
/* ====================================================================== */

/* Custom styling for password reveal toggle */
[data-fi-form-text-input-show-password-button] {
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    padding: 0.25rem;
}

[data-fi-form-text-input-show-password-button]:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

[data-fi-form-text-input-show-password-button]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* RTL support for password reveal button */
[dir="rtl"] [data-fi-form-text-input-show-password-button] {
    transform: scaleX(-1);
}

/* Enhanced styling for password fields with reveal */
.fi-input-wrapper:has([data-fi-form-text-input-show-password-button]) {
    position: relative;
}

/* Custom icon styling for better visibility */
[data-fi-form-text-input-show-password-button] svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

[data-fi-form-text-input-show-password-button]:hover svg {
    color: #3b82f6;
}

/* Dark mode support for reveal button */
.dark [data-fi-form-text-input-show-password-button]:hover {
    background-color: rgba(147, 197, 253, 0.1);
    color: #93c5fd;
}

.dark [data-fi-form-text-input-show-password-button] svg {
    color: #9ca3af;
}

.dark [data-fi-form-text-input-show-password-button]:hover svg {
    color: #93c5fd;
}

/* Password field with reveal button spacing */
.fi-input-text:has([data-fi-form-text-input-show-password-button]) {
    padding-left: 2.5rem;
}

[dir="rtl"] .fi-input-text:has([data-fi-form-text-input-show-password-button]) {
    padding-left: 0.75rem;
    padding-right: 2.5rem;
}

/* ====================================================================== */
/* CUSTOM PERSONAL INFO VALIDATION STYLES */
/* ====================================================================== */

/* Name validation helper container */
.name-validation-helper {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fef3c7;
    border-radius: 0.5rem;
    border: 1px solid #f59e0b;
}

.dark .name-validation-helper {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Validation requirements list */
.validation-requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #92400e;
    font-size: 0.75rem;
}

.dark .validation-requirements-list {
    color: #fbbf24;
}

.validation-requirements-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.validation-requirements-list li .requirement-icon {
    width: 0.875rem;
    height: 0.875rem;
    margin-left: 0.5rem;
    color: #059669;
    flex-shrink: 0;
}

/* Validation examples styling */
.validation-examples {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #92400e;
}

.dark .validation-examples {
    color: #fbbf24;
}

.validation-examples strong {
    font-weight: 600;
    color: #78350f;
}

.dark .validation-examples strong {
    color: #f59e0b;
}

/* Real-time validation feedback */
.name-input-valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 1px #10b981;
}

.name-input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444;
}

/* Enhanced validation input styling */
.name-validation-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.name-validation-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Validation error state that preserves input value */
.name-validation-input.has-error {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 1px #f59e0b;
    background-color: #fffbeb;
}

.dark .name-validation-input.has-error {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: #fbbf24 !important;
}

/* Warning state for invalid but preserved input */
.name-validation-input.warning {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 1px #f59e0b;
    background-color: #fffbeb;
}

.dark .name-validation-input.warning {
    background-color: rgba(245, 158, 11, 0.1);
}

/* Name validation states */
.name-validation-success {
    animation: pulse-success 1s ease-in-out;
}

.name-validation-error {
    animation: pulse-error 1s ease-in-out;
}

/* Character counter for name field */
.name-character-counter {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    text-align: left;
}

[dir="rtl"] .name-character-counter {
    text-align: right;
}

.dark .name-character-counter {
    color: #9ca3af;
}

/* RTL Support for validation helper */
[dir="rtl"] .validation-requirements-list li {
    flex-direction: row-reverse;
}

[dir="rtl"] .validation-requirements-list li .requirement-icon {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Enhanced notification styling for name validation */
.fi-no-content[data-validation-type="name"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 1px solid #f59e0b;
}

.dark .fi-no-content[data-validation-type="name"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}