/* Reusable component styles */


/* Form elements */
input[type="text"], textarea {
    font-family: var(--font-sans);
    transition: all 0.15s ease;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--ring-primary);
}

select {
    font-family: var(--font-sans);
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--ring-primary);
}

/* Passphrase Modal */
.passphrase-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.passphrase-modal-content {
    background: var(--color-bg-white);
    padding: 32px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.passphrase-modal-content h2 {
    margin: 0 0 8px 0;
    color: #292524;
    font-size: 24px;
}

.passphrase-modal-content p {
    margin: 0 0 24px 0;
    color: var(--color-text-tertiary);
    font-size: 14px;
}

.passphrase-input-container {
    position: relative;
    margin-bottom: 16px;
}

.passphrase-input-container input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.passphrase-input-container input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--ring-primary);
}

.passphrase-input-container .show-hide-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.passphrase-input-container .show-hide-btn:hover {
    opacity: 1;
}

/* Passphrase Strength Indicator */
.passphrase-strength {
    margin-bottom: 16px;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.strength-bar-fill[data-score="0"] {
    width: 0%;
    background: var(--color-error);
}

.strength-bar-fill[data-score="1"] {
    width: 25%;
    background: var(--color-error);
}

.strength-bar-fill[data-score="2"] {
    width: 50%;
    background: var(--color-warning-light);
}

.strength-bar-fill[data-score="3"] {
    width: 75%;
    background: var(--color-success-hover);
}

.strength-bar-fill[data-score="4"] {
    width: 100%;
    background: var(--color-green-teal);
}

.strength-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #292524;
}

.strength-feedback {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

/* Passphrase Options */
.passphrase-options {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #292524;
}

/* Passphrase Actions */
.passphrase-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.passphrase-btn-primary,
.passphrase-btn-secondary,
.passphrase-btn-link {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.passphrase-btn-primary {
    background: var(--color-primary);
    color: white;
}

.passphrase-btn-primary:hover {
    background: var(--color-primary-hover);
}

.passphrase-btn-primary:disabled {
    background: var(--color-gray-medium);
    cursor: not-allowed;
}

.passphrase-btn-secondary {
    background: var(--color-bg-subtle);
    color: #292524;
}

.passphrase-btn-secondary:hover {
    background: var(--color-border);
}

.passphrase-btn-link {
    background: none;
    color: var(--color-primary);
    text-decoration: underline;
    padding: 8px;
}

.passphrase-btn-link:hover {
    color: var(--color-primary-hover);
}

.passphrase-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.passphrase-status.success {
    background: #d1fae5;
    color: var(--color-green-dark-teal);
    display: block;
}

.passphrase-status.error {
    background: var(--color-error-bg);
    color: var(--color-error-darker);
    display: block;
}

/* Locked Overlay */
.locked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.locked-overlay-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 48px;
}

.lock-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.locked-overlay-content h2 {
    margin: 0 0 12px 0;
    color: white;
    font-size: 32px;
}

.locked-overlay-content p {
    margin: 0 0 32px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.unlock-btn {
    padding: 14px 32px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.unlock-btn:hover {
    background: var(--color-primary-hover);
}


