/* Bac2Me Enhanced Registration Form Styling */

.bac2me-registration-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
}

.bac2me-registration-container h2 {
    font-size: 28px;
    font-weight: 600;
    color: #11181c;
    margin-bottom: 8px;
    text-align: center;
}

.bac2me-registration-container .subtitle {
    font-size: 14px;
    color: #687076;
    text-align: center;
    margin-bottom: 30px;
}

/* Form Groups */
.bac2me-form-group {
    margin-bottom: 20px;
}

.bac2me-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #11181c;
    margin-bottom: 8px;
}

.bac2me-form-group .required {
    color: #ef4444;
    margin-left: 4px;
}

.bac2me-form-group .optional {
    color: #687076;
    font-size: 12px;
    margin-left: 4px;
}

.bac2me-form-group input[type="text"],
.bac2me-form-group input[type="email"],
.bac2me-form-group input[type="password"],
.bac2me-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.bac2me-form-group input[type="text"]:focus,
.bac2me-form-group input[type="email"]:focus,
.bac2me-form-group input[type="password"]:focus,
.bac2me-form-group textarea:focus {
    outline: none;
    border-color: #0a7ea4;
    box-shadow: 0 0 0 3px rgba(10, 126, 164, 0.1);
}

.bac2me-form-group input:disabled {
    background-color: #f5f5f5;
    color: #687076;
    cursor: not-allowed;
}

/* Help text */
.bac2me-form-group .help-text {
    font-size: 12px;
    color: #687076;
    margin-top: 6px;
    line-height: 1.4;
}

.bac2me-form-group .help-text.error {
    color: #ef4444;
}

.bac2me-form-group .help-text.success {
    color: #22c55e;
}

/* Input wrapper with icon */
.bac2me-input-wrapper {
    position: relative;
}

.bac2me-input-wrapper .input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #687076;
    font-size: 18px;
    transition: color 0.2s;
}

.bac2me-input-wrapper .input-icon:hover {
    color: #11181c;
}

/* Password visibility toggle */
.bac2me-password-toggle {
    position: relative;
}

.bac2me-password-toggle input {
    padding-right: 40px;
}

.bac2me-password-toggle .toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #687076;
    font-size: 18px;
    transition: color 0.2s;
    user-select: none;
}

.bac2me-password-toggle .toggle-icon:hover {
    color: #11181c;
}

/* Master Code section */
.bac2me-master-code-section {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #0a7ea4;
}

.bac2me-master-code-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #11181c;
    margin: 0 0 12px 0;
}

.bac2me-master-code-section p {
    font-size: 13px;
    color: #687076;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.bac2me-master-code-section .code-generator {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.bac2me-master-code-section .code-generator button {
    flex: 1;
    padding: 10px;
    background: #0a7ea4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.bac2me-master-code-section .code-generator button:hover {
    background: #086a8a;
}

.bac2me-master-code-section .code-generator button:active {
    transform: scale(0.98);
}

/* Security questions section */
.bac2me-security-questions-section {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #22c55e;
}

.bac2me-security-questions-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #11181c;
    margin: 0 0 12px 0;
}

.bac2me-security-questions-section p {
    font-size: 13px;
    color: #687076;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.bac2me-question-item {
    margin-bottom: 16px;
}

.bac2me-question-item:last-child {
    margin-bottom: 0;
}

.bac2me-question-item label {
    font-size: 13px;
    font-weight: 500;
    color: #11181c;
    margin-bottom: 6px;
}

.bac2me-question-item select,
.bac2me-question-item input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}

.bac2me-question-item select:focus,
.bac2me-question-item input[type="text"]:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Buttons */
.bac2me-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.bac2me-button.primary {
    background: #0a7ea4;
    color: white;
    margin-bottom: 12px;
}

.bac2me-button.primary:hover {
    background: #086a8a;
}

.bac2me-button.primary:active {
    transform: scale(0.98);
}

.bac2me-button.primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.bac2me-button.secondary {
    background: transparent;
    color: #0a7ea4;
    border: 1px solid #0a7ea4;
}

.bac2me-button.secondary:hover {
    background: #f5f5f5;
}

/* Form sections */
.bac2me-form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.bac2me-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bac2me-form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #11181c;
    margin-bottom: 16px;
}

/* Error messages */
.bac2me-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.bac2me-error strong {
    font-weight: 600;
}

/* Success messages */
.bac2me-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.bac2me-success strong {
    font-weight: 600;
}

/* Loading state */
.bac2me-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #0a7ea4;
    border-radius: 50%;
    animation: bac2me-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes bac2me-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */

/* Tablet and smaller screens */
@media (max-width: 768px) {
    .bac2me-registration-container {
        max-width: 600px;
        margin: 20px auto;
        padding: 20px;
    }
    
    .bac2me-registration-container h2 {
        font-size: 24px;
    }
    
    .bac2me-form-group {
        margin-bottom: 16px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .bac2me-registration-container {
        max-width: 100%;
        margin: 10px;
        padding: 15px;
    }
    
    .bac2me-registration-container h2 {
        font-size: 20px;
    }
    
    .bac2me-registration-container .subtitle {
        font-size: 12px;
    }
    
    .bac2me-form-group {
        margin-bottom: 12px;
    }
    
    .bac2me-form-group label {
        font-size: 13px;
    }
    
    .bac2me-form-group input[type="text"],
    .bac2me-form-group input[type="email"],
    .bac2me-form-group input[type="password"],
    .bac2me-form-group textarea {
        font-size: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bac2me-registration-container {
        background: #1e2022;
        color: #ecedee;
    }
    
    .bac2me-registration-container h2 {
        color: #ecedee;
    }
    
    .bac2me-registration-container .subtitle {
        color: #9ba1a6;
    }
    
    .bac2me-form-group label {
        color: #ecedee;
    }
    
    .bac2me-form-group input[type="text"],
    .bac2me-form-group input[type="email"],
    .bac2me-form-group input[type="password"],
    .bac2me-form-group textarea {
        background: #334155;
        border-color: #475569;
        color: #ecedee;
    }
    
    .bac2me-form-group input[type="text"]:focus,
    .bac2me-form-group input[type="email"]:focus,
    .bac2me-form-group input[type="password"]:focus,
    .bac2me-form-group textarea:focus {
        border-color: #0a7ea4;
        box-shadow: 0 0 0 3px rgba(10, 126, 164, 0.2);
    }
    
    .bac2me-master-code-section,
    .bac2me-security-questions-section {
        background: #334155;
    }
    
    .bac2me-master-code-section h3,
    .bac2me-security-questions-section h3 {
        color: #ecedee;
    }
    
    .bac2me-master-code-section p,
    .bac2me-security-questions-section p {
        color: #cbd5e1;
    }
}
