/* Custom Registration Fields Styles */
.wd-registration-type-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #e1e5e9;
    transition: border-color 0.3s ease;
}

.wd-registration-type-selector:hover {
    border-color: #d1d5db;
}

.wd-form-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    text-align: left;
}

.wd-radio-group {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin: 0;
}

.wd-radio-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 100px;
    justify-content: center;
    font-size: 14px;
    color: #6b7280;
}

.wd-radio-label:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.wd-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Simple checked state */
.wd-radio-label input[type="radio"]:checked {
    ~ .wd-radio-text {
        color: #111827;
        font-weight: 600;
    }
}

.wd-radio-label:has(input[type="radio"]:checked) {
    background: #f3f4f6;
    border-color: #6b7280;
    color: #111827;
}

.wd-radio-text {
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.wd-business-fields {
    margin-top: 25px;
    padding: 25px;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.wd-business-fields.show {
    opacity: 1;
    max-height: 500px;
    margin-top: 25px;
}

.wd-business-fields h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    position: relative;
}

.wd-business-fields h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    margin: 10px auto 0;
    border-radius: 2px;
}

.wd-business-fields .woocommerce-form-row {
    margin-bottom: 20px;
}

.wd-business-fields label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.wd-business-fields .required {
    color: #e74c3c;
    font-weight: 700;
}

.wd-business-fields input[type="text"],
.wd-business-fields input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.wd-business-fields input[type="text"]:focus,
.wd-business-fields input[type="password"]:focus {
    outline: none;
    border-color: #007cba;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

/* Password confirmation field styling */
.wd-password-confirm {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.wd-password-confirm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.wd-password-confirm input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.wd-password-confirm input[type="password"]:focus {
    outline: none;
    border-color: #007cba;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

/* Tüm password alanları için genel stil */
.woocommerce-form-row input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.woocommerce-form-row input[type="password"]:focus {
    outline: none;
    border-color: #007cba;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

.woocommerce-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Privacy Policy Styling */
.wd-privacy-policy {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.wd-privacy-policy p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

.wd-privacy-policy a {
    color: #007cba;
    text-decoration: none;
}

.wd-privacy-policy a:hover {
    text-decoration: underline;
}

/* Checkout Business Info */
.wd-checkout-business-info {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Delivery option (Shipping vs Pickup) - Inside Billing Details */
.wd-delivery-option { margin-bottom: 25px; padding: 20px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; }
.wd-delivery-option h3 { margin: 0 0 15px 0; font-size: 16px; font-weight: 600; color: #495057; }
.wd-delivery-option .form-row-wide { display: flex; gap: 15px; }
.wd-delivery-option .form-row-wide .woocommerce-input-wrapper { display: flex; gap: 15px; }
.wd-delivery-option .woocommerce-input-wrapper label { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid #ced4da; border-radius: 6px; cursor: pointer; background: #fff; transition: all .2s ease; font-weight: 500; color: #495057; font-size: 14px; }
.wd-delivery-option .woocommerce-input-wrapper input[type="radio"] { margin: 0; width: 16px; height: 16px; }
.wd-delivery-option .woocommerce-input-wrapper label:hover { border-color: #adb5bd; background: #f8f9fa; }
.wd-delivery-option .woocommerce-input-wrapper input[type="radio"]:checked + span { color: #007cba; font-weight: 600; }
.wd-delivery-option .woocommerce-input-wrapper input[type="radio"]:checked { accent-color: #007cba; }
.wd-delivery-option .woocommerce-input-wrapper label:has(input[type="radio"]:checked) { border-color: #007cba; background: #e7f3ff; }

/* Responsive */
@media (max-width: 768px) {
    .wd-delivery-option .form-row-wide { flex-direction: column; gap: 10px; }
    .wd-delivery-option .form-row-wide .woocommerce-input-wrapper { flex-direction: column; gap: 10px; }
}

/* Smooth open/close and highlight for shipping details */
.woocommerce-shipping-fields.wd-shipping-open { animation: wdPulse 1s ease 1; box-shadow: 0 0 0 3px rgba(0,124,186,.12); border-radius: 8px; }
@keyframes wdPulse { 0% { box-shadow: 0 0 0 0 rgba(0,124,186,0.0);} 50% { box-shadow: 0 0 0 6px rgba(0,124,186,.12);} 100% { box-shadow: 0 0 0 3px rgba(0,124,186,.12);} }

/* Ensure shipping section is visible when shipping is selected */
#ship-to-different-address {
    display: none;
}

#ship-to-different-address.wd-shipping-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.woocommerce-shipping-fields {
    display: none;
}

.woocommerce-shipping-fields.wd-shipping-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force show shipping fields when shipping is selected */
.wd-shipping-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Additional selectors to ensure shipping fields are visible */
.woocommerce-shipping-fields__field-wrapper {
    display: block !important;
}

.woocommerce-shipping-fields.wd-shipping-visible .woocommerce-shipping-fields__field-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force show individual shipping fields */
#shipping_first_name_field,
#shipping_last_name_field,
#shipping_company_field,
#shipping_address_1_field,
#shipping_address_2_field,
#shipping_city_field,
#shipping_state_field,
#shipping_postcode_field,
#shipping_country_field {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Accordion headings */
.wd-accordion > h3.wd-accordion__title { cursor: pointer; position: relative; padding-right: 28px; background: #f8f9fa; border: 1px solid #e1e5e9; border-radius: 8px; padding: 15px 20px; margin: 10px 0; transition: all .2s ease; }
.wd-accordion > h3.wd-accordion__title:hover { background: #e9ecef; }
.wd-accordion > h3.wd-accordion__title::after { content: '\25BC'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 14px; transition: transform .2s ease; color: #6c757d; }
.wd-accordion > h3.wd-accordion__title.is-open::after { transform: translateY(-50%) rotate(180deg); color: #007cba; }
.wd-accordion > h3.wd-accordion__title.is-open { background: #f0f8ff; border-color: #007cba; color: #007cba; }

.wd-checkout-business-info h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* User Profile Fields */
.business-field {
    display: none;
}

.business-field.show {
    display: table-row;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wd-registration-type-selector {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .wd-business-fields {
        padding: 15px;
    }
    
    .wd-radio-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .wd-radio-label {
        min-width: auto;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .wd-form-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
}

/* Animation for showing/hiding fields */
.wd-business-fields {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wd-business-fields.show {
    opacity: 1;
    max-height: 500px;
}

/* Field error styles */
.wd-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
    background-color: #fff5f5 !important;
}

.wd-field-error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
    line-height: 1.3;
    background-color: #fff5f5;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

/* Form validation styles */
.woocommerce-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}
/* Force visibility of server error notices - prevent any hiding */
.woocommerce-error { 
    display: block !important; 
    visibility: visible !important; 
    opacity: 1 !important;
    position: relative !important;
    z-index: 9999 !important;
}

/* Prevent any script from hiding notices */
.woocommerce-error[style*="display: none"],
.woocommerce-error[style*="visibility: hidden"],
.woocommerce-error[style*="opacity: 0"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.woocommerce-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}
/* Force visibility of success notices */
.woocommerce-message { display:block !important; visibility:visible !important; opacity:1 !important; }
