/* Encryption UI Styles - Company Standard */

/* ===== Recovery Cards Components ===== */

.guardian-cards-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.guardian-cards-header {
    margin-bottom: 1.5rem;
}

.guardian-cards-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guardian-icon {
    font-size: 1.5rem;
}

.guardian-cards-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Guardian Warning Box */
.guardian-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.guardian-warning__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.guardian-warning__content {
    flex: 1;
}

.guardian-warning__list {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.guardian-warning__list li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* Cards Grid */
.guardian-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.guardian-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.guardian-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.guardian-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #3a3a7c;
    color: white;
}

.guardian-card__number {
    font-weight: 500;
    font-size: 0.875rem;
}

.guardian-card__copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.guardian-card__copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.guardian-card__content {
    padding: 0.75rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.8rem;
    word-break: break-all;
    color: #333;
    background: #fafafa;
}

.guardian-card__format {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    color: #999;
    background: #f5f5f5;
    border-top: 1px solid #eee;
}

/* Action Buttons */
.guardian-cards-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.guardian-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guardian-action-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.guardian-action-btn--print {
    color: #3a3a7c;
    border-color: #3a3a7c;
}

.guardian-action-btn--print:hover {
    background: #3a3a7c;
    color: white;
}

.guardian-action-btn--danger {
    color: #dc3545;
    border-color: #dc3545;
}

.guardian-action-btn--danger:hover {
    background: #dc3545;
    color: white;
}

.btn-icon {
    font-size: 1rem;
}

/* Confirmation Checkbox */
.guardian-confirmation {
    padding: 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.guardian-confirmation__label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.guardian-confirmation__label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* ===== Encryption Info Section (Registration) ===== */

.encryption-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.encryption-info__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.encryption-info__icon {
    font-size: 1.5rem;
}

.encryption-info__header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.encryption-info__text {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.encryption-info__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.encryption-info__features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: #555;
}

.encryption-info__features .feature-icon {
    color: #28a745;
    font-weight: bold;
}

/* ===== Recovery Info Section ===== */

.recovery-info {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.recovery-info__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.recovery-info__icon {
    font-size: 1.5rem;
}

.recovery-info__header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #004085;
}

.recovery-info__steps {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}

.recovery-info__steps li {
    padding: 0.25rem 0;
    color: #555;
}

.recovery-info__warning {
    padding: 0.75rem;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #856404;
}

/* ===== Security Settings Page ===== */

.security-settings {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.security-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.security-card__header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.security-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-card__content {
    padding: 1.5rem;
}

.security-card__description {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Encryption Status Badge */
.encryption-status {
    margin-bottom: 1.5rem;
}

.encryption-status__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.encryption-status__badge--active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.encryption-status__badge--inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.encryption-status__badge--warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.badge-icon {
    font-size: 1rem;
}

/* Security Info Grid */
.security-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.security-info-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.security-info-item__label {
    display: block;
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.security-info-item__value {
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
}

.security-info-item__value--truncated {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.security-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.security-badge--secure {
    background: #d4edda;
    color: #155724;
}

.security-badge--warning {
    background: #fff3cd;
    color: #856404;
}

.security-badge--danger {
    background: #f8d7da;
    color: #721c24;
}

/* Security Actions */
.security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.security-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.security-action-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.security-action-btn--danger:hover {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Security Form */
.security-form__group {
    margin-bottom: 1rem;
}

.security-form__label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.security-form__input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.security-form__input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #3a3a7c;
    box-shadow: 0 0 0 3px rgba(58, 58, 124, 0.1);
}

.security-form__helper {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #999;
}

.security-form__warning {
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #856404;
    margin-bottom: 1rem;
}

.security-form__button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #3a3a7c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.security-form__button:hover {
    background: #2d2d6c;
}

/* Guardian Info */
.guardian-info {
    margin-bottom: 1rem;
}

.guardian-info__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #666;
}

.guardian-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Session Info */
.session-info {
    margin-bottom: 1rem;
}

.session-info__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #666;
}

/* Data Actions */
.data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ===== Recovery Alternatives ===== */

.recovery-alternatives {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.recovery-alternatives h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.recovery-alternatives ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recovery-alternatives li {
    margin-bottom: 0.5rem;
}

.recovery-alternatives a {
    color: #3a3a7c;
    text-decoration: none;
}

.recovery-alternatives a:hover {
    text-decoration: underline;
}

/* Recovery Help */
.recovery-help {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.recovery-help h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.recovery-help p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #666;
}

.recovery-help ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}

.recovery-help li {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

/* ===== Key Display ===== */

.key-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.key-display__value {
    display: block;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    color: #333;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.key-display__copy-btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #3a3a7c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.key-display__copy-btn:hover {
    background: #2d2d6c;
}

/* ===== Info Section (Modals) ===== */

.info-section {
    margin-bottom: 1.5rem;
}

.info-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.info-section p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.info-section ol,
.info-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.info-section li {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.info-section code {
    background: #f8f9fa;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.info-section--warning {
    padding: 1rem;
    background: #fff3cd;
    border-radius: 6px;
}

/* ===== Auth Card Wide Variant ===== */

.auth-card--wide {
    max-width: 600px;
}

/* ===== Textarea Styling ===== */

.auth-form__textarea {
    width: 100%;
    padding: 0.75rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 120px;
}

.auth-form__textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #3a3a7c;
    box-shadow: 0 0 0 3px rgba(58, 58, 124, 0.1);
}

.auth-form__helper-text {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

/* ===== Inline Form ===== */

.inline-form {
    display: inline;
}

/* ===== Security Card Icon ===== */

.security-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* ===== Guardian Additions ===== */

.guardian-info__icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.guardian-action-btn--info {
    color: #3a3a7c;
    border-color: #3a3a7c;
}

.guardian-action-btn--info:hover {
    background: #3a3a7c;
    color: white;
}

/* ===== Session Actions ===== */

.session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.session-info__icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===== Modal Components ===== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal--active {
    display: flex;
}

.modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal__content {
    position: relative;
    z-index: 1001;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal__content--large {
    max-width: 640px;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal__header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 0.25rem;
    transition: color 0.2s ease;
}

.modal__close:hover {
    color: #333;
}

.modal__body {
    padding: 1.5rem;
}

.modal__description {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.modal-open {
    overflow: hidden;
}

/* ===== Setup Encryption Banner ===== */

.setup-encryption-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.setup-encryption-banner__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.setup-encryption-banner__content {
    flex: 1;
}

.setup-encryption-banner__content strong {
    display: block;
    color: #721c24;
    margin-bottom: 0.25rem;
}

.setup-encryption-banner__content p {
    margin: 0;
    font-size: 0.875rem;
    color: #721c24;
}

.setup-encryption-banner__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #721c24;
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.setup-encryption-banner__btn:hover {
    background: #5a1520;
    color: white;
}

/* ===== Security Form Error Variant ===== */

.security-form__error {
    padding: 0.75rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #721c24;
    margin-bottom: 1rem;
}

/* ===== Responsive Adjustments ===== */

@media (max-width: 768px) {
    .guardian-cards-grid {
        grid-template-columns: 1fr;
    }

    .guardian-cards-actions {
        flex-direction: column;
    }

    .guardian-action-btn {
        justify-content: center;
    }

    .security-info-grid {
        grid-template-columns: 1fr;
    }

    .security-actions {
        flex-direction: column;
    }

    .security-action-btn {
        justify-content: center;
    }
}

@media print {
    .guardian-cards-container,
    .guardian-cards-actions,
    .guardian-confirmation,
    .security-form__button,
    .security-action-btn {
        display: none !important;
    }

    .guardian-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}