/* ===========================================
   Two Factor Authentication Styles
   Shared: Administrador + Cliente panels
   Extracted from:
   - resources/views/filament/components/recovery-codes.blade.php
   - resources/views/filament/components/qr-code.blade.php
   =========================================== */

/* ===== RECOVERY CODES ===== */

/* Contenedor principal */
.recovery-codes-container {
    padding: 1.25rem !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
    background-color: #ffffff !important;
}

html.dark .recovery-codes-container,
.dark .recovery-codes-container {
    background-color: #1f2937 !important;
}

/* Alerta de advertencia */
.recovery-alert {
    padding: 1rem !important;
    margin-bottom: 1.25rem !important;
    border-radius: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    background-color: #fef2f2 !important;
    border: 1px solid #dc2626 !important;
}

html.dark .recovery-alert,
.dark .recovery-alert {
    background-color: rgba(220, 38, 38, 0.1) !important;
    border-color: #991b1b !important;
}

.recovery-alert-icon {
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
}

.alert-icon {
    height: 2rem !important;
    width: 2rem !important;
    color: #dc2626 !important;
}

html.dark .alert-icon,
.dark .alert-icon {
    color: #f87171 !important;
}

.recovery-alert-text {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #991b1b !important;
    margin: 0 !important;
    line-height: 1.25rem !important;
}

html.dark .recovery-alert-text,
.dark .recovery-alert-text {
    color: #fca5a5 !important;
}

/* Botón copiar todos */
.recovery-copy-all-wrapper {
    margin-bottom: 1rem !important;
}

.recovery-copy-all-btn {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid transparent !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    background-color: #fcd34d !important;
    color: #1f2937 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    outline: none !important;
}

.recovery-copy-all-btn:hover {
    background-color: #fbbf24 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1) !important;
}

.recovery-copy-all-btn:focus {
    outline: 2px solid #f59e0b !important;
    outline-offset: 2px !important;
}

html.dark .recovery-copy-all-btn,
.dark .recovery-copy-all-btn {
    background-color: #d97706 !important;
    color: #ffffff !important;
}

html.dark .recovery-copy-all-btn:hover,
.dark .recovery-copy-all-btn:hover {
    background-color: #b45309 !important;
}

.btn-icon {
    height: 1.25rem !important;
    width: 1.25rem !important;
    margin-right: 0.5rem !important;
}

/* Caja de códigos */
.recovery-codes-box {
    padding: 1rem !important;
    border-radius: 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    background-color: #ffffff !important;
}

html.dark .recovery-codes-box,
.dark .recovery-codes-box {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

.recovery-codes-instruction {
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    margin-top: 0 !important;
    line-height: 1.25rem !important;
}

html.dark .recovery-codes-instruction,
.dark .recovery-codes-instruction {
    color: #d1d5db !important;
}

/* Grid de códigos */
.recovery-codes-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
}

@media (min-width: 768px) {
    .recovery-codes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Item individual de código */
.recovery-code-item {
    position: relative !important;
}

.recovery-code-box {
    position: relative !important;
    padding: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 1rem !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
}

html.dark .recovery-code-box,
.dark .recovery-code-box {
    background-color: #111827 !important;
    border-color: #374151 !important;
}

.recovery-code-box:hover {
    border-color: #f59e0b !important;
}

html.dark .recovery-code-box:hover,
.dark .recovery-code-box:hover {
    border-color: #d97706 !important;
}

.recovery-code-text {
    position: relative !important;
    z-index: 10 !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    user-select: all !important;
    -webkit-user-select: all !important;
    -moz-user-select: all !important;
    -ms-user-select: all !important;
    color: #111827 !important;
}

html.dark .recovery-code-text,
.dark .recovery-code-text {
    color: #e5e7eb !important;
}

.recovery-code-overlay {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 0.5rem !important;
    background-color: #fef3c7 !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease-in-out !important;
    pointer-events: none !important;
}

html.dark .recovery-code-overlay,
.dark .recovery-code-overlay {
    background-color: rgba(217, 119, 6, 0.3) !important;
}

.recovery-code-box:hover .recovery-code-overlay {
    opacity: 0.7 !important;
}

.recovery-code-copy-label {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 0.75rem !important;
    color: #d97706 !important;
    font-weight: 500 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease-in-out !important;
    z-index: 20 !important;
}

html.dark .recovery-code-copy-label,
.dark .recovery-code-copy-label {
    color: #fbbf24 !important;
}

.recovery-code-box:hover .recovery-code-copy-label {
    opacity: 1 !important;
}

/* Consejos de almacenamiento */
.recovery-tips {
    margin-top: 1.25rem !important;
    display: flex !important;
    align-items: flex-start !important;
    padding: 1rem !important;
    border-radius: 0.5rem !important;
    border: 1px solid #fcd34d !important;
    background-color: #fffbeb !important;
}

html.dark .recovery-tips,
.dark .recovery-tips {
    background-color: rgba(217, 119, 6, 0.1) !important;
    border-color: #b45309 !important;
}

.tips-icon {
    margin-right: 0.5rem !important;
    margin-top: 0.125rem !important;
    height: 1.25rem !important;
    width: 1.25rem !important;
    flex-shrink: 0 !important;
    color: #f59e0b !important;
}

html.dark .tips-icon,
.dark .tips-icon {
    color: #fbbf24 !important;
}

.tips-content {
    font-size: 0.875rem !important;
    color: #78350f !important;
}

html.dark .tips-content,
.dark .tips-content {
    color: #fcd34d !important;
}

.tips-title {
    margin-bottom: 0.25rem !important;
    font-weight: 600 !important;
    margin-top: 0 !important;
}

.tips-list {
    padding-left: 1.25rem !important;
    margin: 0 !important;
    list-style-type: disc !important;
}

.tips-list li {
    margin-bottom: 0.25rem !important;
}

.tips-list li:last-child {
    margin-bottom: 0 !important;
}

/* ===== QR CODE ===== */

/* Contenedor principal del modal QR */
.qr-modal-container {
    padding: 1.5rem !important;
    background-color: #ffffff !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

html.dark .qr-modal-container,
.dark .qr-modal-container {
    background-color: #1f2937 !important;
}

.qr-header {
    text-align: center !important;
    margin-bottom: 1rem !important;
}

.qr-title {
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    color: #111827 !important;
    margin: 0 !important;
    line-height: 1.75rem !important;
}

html.dark .qr-title,
.dark .qr-title {
    color: #f9fafb !important;
}

.qr-subtitle {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0 !important;
    line-height: 1.25rem !important;
}

html.dark .qr-subtitle,
.dark .qr-subtitle {
    color: #9ca3af !important;
}

.qr-code-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.qr-code-box {
    padding: 0.5rem !important;
    background-color: #ffffff !important;
    border-radius: 0.5rem !important;
    display: inline-block !important;
}

.qr-code-box svg {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
}

.qr-manual-section {
    font-size: 0.875rem !important;
    margin-top: 1rem !important;
    line-height: 1.25rem !important;
}

.qr-manual-title {
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    color: #374151 !important;
    margin-top: 0 !important;
}

html.dark .qr-manual-title,
.dark .qr-manual-title {
    color: #d1d5db !important;
}

.qr-secret-key {
    background-color: #f3f4f6 !important;
    padding: 0.75rem !important;
    border-radius: 0.375rem !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    text-align: center !important;
    user-select: all !important;
    -webkit-user-select: all !important;
    -moz-user-select: all !important;
    -ms-user-select: all !important;
    font-size: 0.875rem !important;
    color: #111827 !important;
    word-break: break-all !important;
    cursor: text !important;
}

html.dark .qr-secret-key,
.dark .qr-secret-key {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

.qr-secret-key:hover {
    background-color: #e5e7eb !important;
}

html.dark .qr-secret-key:hover,
.dark .qr-secret-key:hover {
    background-color: #4b5563 !important;
}

/* ===== CLIENT RECOVERY CODES - Dark Mode ===== */
/* Extracted from: resources/views/filament/cliente/components/recovery-codes.blade.php */

html.dark .dark-codes-container {
    background-color: rgb(31, 41, 55) !important;
    border-color: rgb(55, 65, 81) !important;
}
