/**
 * MFA Plugin Styles
 * Styling für TOTP-Feld auf der Login-Seite
 */

/* TOTP-Feld soll genauso aussehen wie Benutzername/Passwort-Felder */
#mfa_totp_code {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

#mfa_totp_code:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

/* Form-Gruppe Styling (konsistent mit Roundcube) */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    #mfa_totp_code {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
}

/* Einstellungsseite Styling (Roundcube-Stil) */
.mfa-status {
    margin: 15px 0;
}

.mfa-status-enabled {
    color: #3c763d;
    font-weight: bold;
    margin-bottom: 10px;
}

.mfa-status-disabled {
    color: #a94442;
    font-weight: bold;
    margin-bottom: 10px;
}

.mfa-setup {
    margin: 15px 0;
}

.mfa-setup p {
    margin: 10px 0;
}

.mfa-qrcode {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mfa-qrcode img {
    max-width: 200px;
    height: auto;
    border: 1px solid #ccc;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
}

.mfa-secret-text {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

.mfa-secret-text code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
}

.mfa-recovery {
    margin: 15px 0;
}

.mfa-recovery-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.mfa-recovery-list li {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.mfa-recovery-list li:last-child {
    border-bottom: none;
}

.mfa-recovery-list code {
    background-color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: #333;
    display: inline-block;
    min-width: 100px;
    text-align: center;
    border: 1px solid #ddd;
}

/* Button Styling (Roundcube-Stil) */
.mfa-recovery .button,
.mfa-status .button {
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.42857143;
    border-radius: 3px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.mfa-recovery .button:hover,
.mfa-status .button:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
}

.mfa-recovery .button:active,
.mfa-status .button:active {
    background-color: #d4d4d4;
    border-color: #8c8c8c;
}

/* Form-Buttons */
.mfa-recovery form {
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .mfa-qrcode img {
        max-width: 150px;
    }
    
    .mfa-recovery-list {
        padding: 10px;
    }
}

