/* User Profile Commons Styles */
.form-group-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-group-header {
    margin-bottom: 15px;
}

.group-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    border-bottom: 2px solid #f26122;
    padding-bottom: 8px;
}

.form-group-description {
    margin-bottom: 15px;
}

.group-description {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.form-label-wrapper {
    margin-bottom: 6px;
}

.form-input-wrapper {
    position: relative;
}

.input-helper-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.input-helper-before {
    margin-bottom: 8px;
}

.input-helper-after {
    margin-top: 8px;
}

/* Enhanced form controls */
.textarea-input {
    resize: vertical;
    min-height: 100px;
}

.select-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M6 8L2 4h8z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
}

.email-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23666" d="M2 4l6 4 6-4v8H2V4z M2 2h12v2l-6 4-6-4V2z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: #f26122;
    background-color: #fff;
}

.radio-input,
.checkbox-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.radio-label,
.checkbox-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    flex: 1;
}

.radio-label.disabled,
.checkbox-label.disabled {
    color: #999;
    cursor: not-allowed;
}

/* WebAuthn Styles */
.webauthn-card,
.webauthn-register-card,
.webauthn-error-card {
    max-width: 550px;
}

.webauthn-title,
.webauthn-register-title,
.webauthn-error-title {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 600;
}

.authenticators-section-title {
    color: #333;
    font-size: 16px;
    margin: 25px 0 15px 0;
    text-align: center;
}

.webauthn-authenticators-list {
    margin: 20px 0;
}

.webauthn-authenticator-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    margin-bottom: 12px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.webauthn-authenticator-item:hover {
    border-color: #f26122;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.webauthn-authenticator-icon {
    margin-right: 15px;
    flex-shrink: 0;
}

.webauthn-icon {
    font-size: 24px;
    color: #f26122;
    width: 30px;
    text-align: center;
}

.webauthn-authenticator-details {
    flex: 1;
}

.webauthn-authenticator-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.webauthn-authenticator-transport {
    font-size: 13px;
    color: #666;
    margin-bottom: 3px;
}

.webauthn-authenticator-created {
    font-size: 12px;
    color: #999;
}

.created-label {
    font-weight: 500;
}

.webauthn-action-section {
    margin: 25px 0;
    text-align: center;
}

.webauthn-help {
    margin: 25px 0;
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 20px;
}

.webauthn-help h4 {
    color: #333;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.webauthn-help ol {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 13px;
}

.webauthn-help li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* WebAuthn Register Specific Styles */
.webauthn-register-content {
    text-align: center;
}

.webauthn-register-icon {
    margin-bottom: 20px;
}

.webauthn-register-icon i {
    font-size: 48px;
    color: #28a745;
}

.security-benefits {
    margin: 25px 0;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.security-benefits h4 {
    color: #155724;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

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

.security-benefits li {
    margin-bottom: 8px;
    color: #155724;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-benefits li i {
    color: #28a745;
    font-size: 14px;
    width: 14px;
}

.supported-devices {
    margin: 25px 0;
    background-color: #f8f9fa;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.supported-devices h4 {
    color: #333;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 600;
}

.device-types {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.device-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    flex: 1;
    min-width: 120px;
}

.device-type i {
    font-size: 24px;
    color: #f26122;
    margin-bottom: 8px;
}

.device-type span {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.3;
}

.webauthn-register-actions {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.webauthn-register-help {
    margin: 25px 0;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.webauthn-register-help h4 {
    color: #856404;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.webauthn-register-help ol {
    margin: 0;
    padding-left: 20px;
    color: #856404;
    font-size: 13px;
}

.webauthn-register-help li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* WebAuthn Error Specific Styles */
.webauthn-error-content {
    text-align: center;
}

.webauthn-error-icon {
    margin-bottom: 20px;
}

.webauthn-error-icon i {
    font-size: 48px;
    color: #dc3545;
}

.webauthn-error-message {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: left;
}

.error-reasons {
    list-style: disc;
    padding-left: 20px;
    margin: 15px 0;
    color: #666;
    font-size: 14px;
}

.error-reasons li {
    margin-bottom: 5px;
}

.webauthn-error-actions {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    justify-content: center;
}

.webauthn-error-help {
    margin: 25px 0;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.webauthn-error-help h4 {
    color: #721c24;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.webauthn-error-help ul {
    margin: 0;
    padding-left: 20px;
    color: #721c24;
    font-size: 13px;
}

.webauthn-error-help li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.alternative-methods {
    margin: 25px 0;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.alternative-methods h4 {
    color: #0c5460;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.alternative-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f26122;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.alternative-link:hover {
    text-decoration: underline;
    color: #e5551a;
}

/* Responsive Design for Final Templates */
@media (max-width: 768px) {
    .webauthn-card,
    .webauthn-register-card,
    .webauthn-error-card {
        padding: 20px 15px;
        max-width: none;
    }

    .webauthn-title,
    .webauthn-register-title,
    .webauthn-error-title {
        font-size: 20px;
    }

    .webauthn-authenticator-item {
        padding: 12px;
    }

    .webauthn-icon {
        font-size: 20px;
        width: 25px;
    }

    .webauthn-authenticator-label {
        font-size: 15px;
    }

    .device-types {
        flex-direction: column;
    }

    .device-type {
        min-width: auto;
    }

    .webauthn-register-actions,
    .webauthn-error-actions {
        flex-direction: column;
        align-items: center;
    }

    .webauthn-register-icon i,
    .webauthn-error-icon i {
        font-size: 40px;
    }

    .form-group-section {
        padding: 15px;
    }

    .group-title {
        font-size: 16px;
    }

    .device-types {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .radio-group,
    .checkbox-group {
        gap: 8px;
    }

    .option-item {
        padding: 8px 10px;
    }

    .device-type {
        padding: 10px;
    }

    .device-type i {
        font-size: 20px;
    }

    .device-type span {
        font-size: 11px;
    }
}