/* Dual Registration System Styles */
.dual-registration-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.dual-registration-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.dual-reg-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* User Type Selection */
.user-type-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.user-type-option {
    flex: 1;
    max-width: 250px;
    cursor: pointer;
    position: relative;
}

.user-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.user-type-label {
    display: block;
    padding: 15px 25px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
}

.user-type-option input[type="radio"]:checked + .user-type-label {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

.user-type-option:hover .user-type-label {
    border-color: #0073aa;
}

/* Form Styles */
.registration-fields {
    display: none;
}

.registration-fields.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.name-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.form-section h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 18px;
    font-weight: 600;
}

/* Terms and Conditions */
.terms-group {
    margin: 30px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    line-height: 1.5;
}

.checkbox-label a {
    color: #0073aa;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #005a87;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message Box */
.message-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.message-box.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spinner 0.8s ease infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dual-registration-container {
        padding: 30px 20px;
    }
    
    .dual-reg-title {
        font-size: 24px;
    }
    
    .user-type-selection {
        flex-direction: column;
    }
    
    .user-type-option {
        max-width: 100%;
    }
    
    .name-group {
        grid-template-columns: 1fr;
    }
}

/* ========== CHECKOUT PAGE STYLES ========== */

/* Hide fields initially until user type is selected */
.woocommerce-checkout .individual-field,
.woocommerce-checkout .legal-field {
    display: none;
}

/* User type selector styling */
.woocommerce-checkout .user-type-checkout {
    margin-bottom: 20px;
}

.woocommerce-checkout .user-type-checkout select {
    padding: 10px;
    font-size: 15px;
}

/* Ensure fields are properly spaced */
.woocommerce-checkout .individual-field p,
.woocommerce-checkout .legal-field p {
    margin-bottom: 20px;
}

/* Style for disabled fields */
.woocommerce-checkout input:disabled,
.woocommerce-checkout select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Hide company field for individuals */
.woocommerce-checkout .hidden-field {
    display: none !important;
}

.woocommerce-checkout p.hidden-field {
    display: none !important;
}

