/**
 * HK Donations - Frontend Styles
 * Version: 1.2.0
 */

:root {
    --hk-primary: #21b8e5;
    --hk-primary-light: rgba(33, 184, 229, 0.15);
    --hk-primary-dark: #1a9bc4;
    --hk-secondary: #32373c;
    --hk-gray-100: #f9fafb;
    --hk-gray-200: #e5e7eb;
    --hk-gray-400: #9ca3af;
    --hk-gray-600: #6b7280;
    --hk-error: #dc2626;
    --hk-success: #22c55e;
    --hk-radius: 12px;
    --hk-radius-sm: 8px;
    --hk-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --hk-transition: all 0.2s ease;
}

/* Main Container */
.hk-donation-form {
    max-width: 580px;
    margin: 0 auto 35px;
    background: #fff;
    border-radius: var(--hk-radius);
    box-shadow: var(--hk-shadow);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.hk-donation-form .hk-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--hk-primary) 0%, var(--hk-primary-dark) 100%);
    color: #fff;
    position: relative;
}

/* Language Switcher */
.hk-donation-form .hk-lang-switch {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.hk-donation-form .hk-lang-btn {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
}

.hk-donation-form .hk-lang-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.hk-donation-form .hk-lang-btn.active {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.hk-donation-form .hk-title {
    font-size: 22px;
    font-weight: 700;
    margin: 8px 0 4px;
}

.hk-donation-form .hk-description {
    font-size: 14px;
    opacity: 0.9;
}

/* Progress Steps */
.hk-donation-form .hk-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--hk-gray-100);
    border-bottom: 1px solid var(--hk-gray-200);
}

.hk-donation-form .hk-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hk-donation-form .hk-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hk-gray-200);
    color: var(--hk-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    transition: var(--hk-transition);
}

.hk-donation-form .hk-step.active .hk-step-num {
    background: var(--hk-primary);
    color: #fff;
    transform: scale(1.1);
}

.hk-donation-form .hk-step.completed .hk-step-num {
    background: var(--hk-success);
    color: #fff;
}

.hk-donation-form .hk-step-label {
    font-size: 11px;
    color: var(--hk-gray-400);
    font-weight: 500;
}

.hk-donation-form .hk-step.active .hk-step-label {
    color: var(--hk-primary);
    font-weight: 600;
}

.hk-donation-form .hk-step-line {
    width: 40px;
    height: 2px;
    background: var(--hk-gray-200);
    margin: 0 8px;
    margin-bottom: 18px;
}

.hk-donation-form .hk-step-line.completed {
    background: var(--hk-success);
}

/* Content */
.hk-donation-form .hk-content {
    padding: 24px;
}

.hk-donation-form .hk-panel {
    display: none;
    animation: hkFadeIn 0.3s ease;
}

.hk-donation-form .hk-panel.active {
    display: block;
}

@keyframes hkFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Labels */
.hk-donation-form .hk-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hk-secondary);
    margin-bottom: 10px;
}

/* Frequency */
.hk-donation-form .hk-frequency {
    margin-bottom: 24px;
}

.hk-donation-form .hk-frequency-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.hk-donation-form .hk-freq-btn {
    padding: 14px 8px;
    border: 2px solid var(--hk-gray-200);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--hk-gray-600);
    cursor: pointer;
    border-radius: var(--hk-radius-sm);
    transition: var(--hk-transition);
    text-align: center;
}

.hk-donation-form .hk-freq-btn:hover {
    border-color: var(--hk-primary);
    color: var(--hk-primary);
    background: var(--hk-primary-light);
}

.hk-donation-form .hk-freq-btn:active {
    transform: scale(0.98);
}

.hk-donation-form .hk-freq-btn.active {
    border-color: var(--hk-primary);
    background: var(--hk-primary-light);
    color: var(--hk-primary);
}

.hk-donation-form .hk-freq-btn .hk-heart {
    color: #ef4444;
}

/* Amount Grid */
.hk-donation-form .hk-amounts {
    margin-bottom: 20px;
}

.hk-donation-form .hk-amounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hk-donation-form .hk-amount-btn {
    padding: 16px 8px;
    border: 2px solid var(--hk-gray-200);
    background: #fff;
    font-size: 15px;
    font-weight: 700;
    color: var(--hk-secondary);
    cursor: pointer;
    border-radius: var(--hk-radius-sm);
    transition: var(--hk-transition);
}

.hk-donation-form .hk-amount-btn:hover {
    border-color: var(--hk-primary) !important;
    color: var(--hk-primary) !important;
    background: #f0fdf4 !important;
    box-shadow: none !important;
}

.hk-donation-form .hk-amount-btn:active {
    transform: scale(0.97);
}

.hk-donation-form .hk-amount-btn.active {
    border-color: var(--hk-primary) !important;
    background: var(--hk-primary) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.hk-donation-form .hk-amount-btn.active:hover {
    border-color: var(--hk-primary-dark, #16a34a) !important;
    background: var(--hk-primary-dark, #16a34a) !important;
    color: #fff !important;
}

/* Custom Amount */
.hk-donation-form .hk-custom {
    margin-bottom: 20px;
}

.hk-donation-form .hk-custom-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--hk-gray-200);
    border-radius: var(--hk-radius-sm);
    padding: 0 16px;
    background: #fff;
    transition: var(--hk-transition);
}

.hk-donation-form .hk-custom-input:focus-within {
    border-color: var(--hk-primary);
}

.hk-donation-form .hk-custom-input .currency {
    font-size: 20px;
    font-weight: 700;
    color: var(--hk-gray-400);
    margin-right: 8px;
}

.hk-donation-form .hk-custom-input input {
    flex: 1;
    border: none;
    padding: 16px 0;
    font-size: 24px;
    font-weight: 700;
    background: transparent;
    outline: none;
    color: var(--hk-secondary);
    min-width: 0;
}

.hk-donation-form .hk-custom-input input::-webkit-outer-spin-button,
.hk-donation-form .hk-custom-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hk-donation-form .hk-custom-input .period {
    font-size: 13px;
    color: var(--hk-gray-400);
    font-weight: 500;
}

/* Info Block */
.hk-donation-form .hk-info-block {
    display: none;
    padding: 14px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--hk-radius-sm);
    margin-bottom: 20px;
}

.hk-donation-form .hk-info-block.visible {
    display: block;
}

.hk-donation-form .hk-info-block .title {
    font-weight: 600;
    color: #1e40af;
    font-size: 13px;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.hk-donation-form .hk-info-block .icon {
    margin-right: 8px;
}

.hk-donation-form .hk-info-block .text {
    font-size: 12px;
    color: #3b82f6;
    line-height: 1.5;
}

/* Form Fields */
.hk-donation-form .hk-field {
    margin-bottom: 16px;
}

.hk-donation-form .hk-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hk-secondary);
    margin-bottom: 8px;
}

.hk-donation-form .hk-field .required {
    color: var(--hk-error);
}

.hk-donation-form .hk-field .optional {
    color: var(--hk-gray-400);
    font-weight: 400;
    font-size: 11px;
}

.hk-donation-form .hk-field input[type="text"],
.hk-donation-form .hk-field input[type="email"],
.hk-donation-form .hk-field input[type="tel"],
.hk-donation-form .hk-field input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--hk-gray-200);
    border-radius: var(--hk-radius-sm);
    font-size: 16px;
    background: #fff;
    color: var(--hk-secondary);
    transition: var(--hk-transition);
    -webkit-appearance: none;
}

.hk-donation-form .hk-field input:focus {
    outline: none;
    border-color: var(--hk-primary);
}

.hk-donation-form .hk-field input::placeholder {
    color: var(--hk-gray-400);
}

.hk-donation-form .hk-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Checkbox */
.hk-donation-form .hk-checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 2px solid var(--hk-gray-200);
    border-radius: var(--hk-radius-sm);
    cursor: pointer;
    transition: var(--hk-transition);
    -webkit-user-select: none;
    user-select: none;
}

.hk-donation-form .hk-checkbox.checked {
    border-color: var(--hk-primary);
    background: var(--hk-primary-light);
}

.hk-donation-form .hk-checkbox input {
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex-shrink: 0;
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid var(--hk-gray-200);
    cursor: pointer;
    position: relative;
    transition: var(--hk-transition);
    margin: 0;
}

.hk-donation-form .hk-checkbox input:checked {
    background: var(--hk-primary);
    border-color: var(--hk-primary);
}

.hk-donation-form .hk-checkbox input:checked::after {
    content: '✓';
    position: absolute;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hk-donation-form .hk-checkbox span {
    font-size: 14px;
    font-weight: 500;
    color: var(--hk-secondary);
    line-height: 1.3;
}

.hk-donation-form .hk-hint {
    font-size: 12px;
    color: var(--hk-gray-400);
    margin-top: 8px;
    font-style: italic;
    padding-left: 4px;
}

/* Corporate Field */
.hk-donation-form .hk-corp-field {
    margin-top: 12px;
    display: none;
}

.hk-donation-form .hk-corp-field.visible {
    display: block;
}

/* Password Section */
.hk-donation-form .hk-password-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid var(--hk-primary);
    border-radius: var(--hk-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.hk-donation-form .hk-section-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.hk-donation-form .hk-section-icon {
    font-size: 24px;
}

.hk-donation-form .hk-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 2px;
}

.hk-donation-form .hk-section-desc {
    font-size: 12px;
    color: #3b82f6;
    line-height: 1.4;
}

.hk-donation-form .hk-password-section .hk-field {
    margin-bottom: 12px;
}

.hk-donation-form .hk-password-section label {
    color: #1e40af;
}

.hk-donation-form .hk-password-section .hk-hint {
    color: #3b82f6;
}

.hk-donation-form .hk-password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.hk-donation-form .hk-password-input input {
    width: 100%;
    padding-right: 50px;
    border: 2px solid #93c5fd;
}

.hk-donation-form .hk-password-input input:focus {
    border-color: var(--hk-primary);
}

.hk-donation-form .hk-toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
}

.hk-donation-form .hk-forgot-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--hk-primary);
    text-decoration: none;
}

/* Summary */
.hk-donation-form .hk-summary {
    background: var(--hk-gray-100);
    border-radius: var(--hk-radius-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.hk-donation-form .hk-summary-header {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--hk-gray-200);
}

.hk-donation-form .hk-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--hk-gray-200);
    font-size: 14px;
}

.hk-donation-form .hk-summary-row:last-of-type {
    border-bottom: none;
}

.hk-donation-form .hk-summary-label {
    color: var(--hk-gray-600);
}

.hk-donation-form .hk-summary-value {
    font-weight: 600;
}

.hk-donation-form .hk-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: var(--hk-primary);
    color: #fff;
    font-weight: 600;
}

.hk-donation-form .hk-summary-total .amount {
    font-size: 20px;
}

/* Receipt */
.hk-donation-form .hk-receipt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f0fdf4;
    border-radius: var(--hk-radius-sm);
    margin-bottom: 20px;
}

.hk-donation-form .hk-receipt .icon {
    font-size: 18px;
}

.hk-donation-form .hk-receipt .text {
    font-size: 13px;
    color: #166534;
}

/* Navigation */
.hk-donation-form .hk-nav {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--hk-gray-100);
    border-top: 1px solid var(--hk-gray-200);
}

.hk-donation-form .hk-btn {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: var(--hk-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--hk-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hk-donation-form .hk-btn:active {
    transform: scale(0.98);
}

.hk-donation-form .hk-btn-back {
    background: #fff;
    color: var(--hk-secondary);
    border: 2px solid var(--hk-gray-200);
    flex: 0 0 auto;
    padding: 16px;
}

.hk-donation-form .hk-btn-next {
    background: var(--hk-primary);
    color: #fff;
}

.hk-donation-form .hk-btn-next:hover {
    background: var(--hk-primary-dark);
    color: #fff;
}

/* Override theme purple focus/hover on all form buttons */
.hk-donation-form button:focus,
.hk-donation-form button:focus-visible,
.hk-donation-form button:hover,
.hk-donation-form .hk-freq-btn:focus,
.hk-donation-form .hk-amount-btn:focus,
.hk-donation-form .hk-amount-btn:focus-visible,
.hk-donation-form .hk-btn:focus {
    outline: 2px solid var(--hk-primary) !important;
    outline-offset: 2px;
    box-shadow: none !important;
    background-color: inherit;
}

.hk-donation-form .hk-btn-submit {
    background: var(--hk-success);
    color: #fff;
    flex: 2;
}

/* My Account Subscriptions */
.hk-subscriptions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hk-subscription-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.hk-subscription-card.hk-status-active {
    border-color: #22c55e;
}

.hk-subscription-card.hk-status-cancelled,
.hk-subscription-card.hk-status-failed {
    border-color: #ef4444;
    background: #fef2f2;
}

.hk-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hk-sub-status {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.hk-sub-frequency {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 20px;
}

.hk-sub-amount {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

.hk-sub-period {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
}

.hk-sub-details {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 15px;
}

.hk-sub-details p {
    margin: 5px 0;
}

.hk-sub-reason {
    color: #dc2626;
}

.hk-sub-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* Modal */
.hk-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.hk-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
}

.hk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.hk-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.hk-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.hk-modal-body {
    padding: 20px;
}

.hk-modal-info {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hk-card-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.hk-card-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}

.hk-card-option:has(input:checked) {
    border-color: #21b8e5;
    background: rgba(33, 184, 229, 0.1);
}

.hk-modal-note {
    font-size: 13px;
    color: #6b7280;
}

.hk-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

/* Responsive */
/* Mobile: tablet */
@media (max-width: 620px) {
    .hk-donation-form {
        max-width: 100% !important;
        margin: 10px !important;
        border-radius: 12px !important;
    }
    
    .hk-donation-form .hk-body {
        padding: 15px !important;
    }
}

/* Mobile: phone */
@media (max-width: 480px) {
    .hk-donation-form .hk-row {
        grid-template-columns: 1fr;
    }
    
    .hk-donation-form .hk-frequency-options {
        grid-template-columns: 1fr;
    }
    
    .hk-donation-form .hk-header {
        padding: 15px !important;
    }
    
    .hk-donation-form .hk-title {
        font-size: 18px !important;
        padding-right: 70px !important;
    }
    
    .hk-donation-form .hk-description {
        font-size: 12px !important;
    }
    
    .hk-donation-form .hk-lang-switch {
        top: 8px !important;
        right: 8px !important;
    }
    
    /* Name fields stack on mobile */
    .hk-wc-checkout #billing_first_name_field,
    .hk-wc-checkout #billing_last_name_field {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .hk-checkout-options label.checkbox {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
}

/* Payment Methods */
.hk-payment-methods {
    margin: 20px 0;
}

.hk-payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--hk-gray-200);
    border-radius: var(--hk-radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--hk-transition);
}

.hk-payment-option:hover {
    border-color: var(--hk-primary);
}

.hk-payment-option.selected {
    border-color: var(--hk-primary);
    background: var(--hk-primary-light);
}

.hk-payment-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--hk-primary);
}

.hk-pm-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.hk-pm-icon {
    display: flex;
    align-items: center;
}

.hk-pm-icon img {
    max-height: 24px;
    width: auto;
}

.hk-pm-title {
    font-weight: 500;
    color: var(--hk-secondary);
}

.hk-secure {
    text-align: center;
    padding: 15px;
    color: var(--hk-gray-600);
    font-size: 14px;
    background: var(--hk-gray-100);
    border-radius: var(--hk-radius-sm);
    margin-top: 15px;
}

.hk-secure span {
    margin-right: 5px;
}

/* Summary in Step 2 */
.hk-summary {
    background: var(--hk-gray-100);
    border-radius: var(--hk-radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.hk-summary-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--hk-secondary);
}

.hk-summary-period {
    font-size: 16px;
    font-weight: 400;
    color: var(--hk-gray-600);
}

.hk-summary-type {
    font-size: 14px;
    color: var(--hk-gray-600);
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hk-badge-recurring {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    background: var(--hk-primary-light);
    color: var(--hk-primary-dark);
    padding: 3px 10px;
    border-radius: 20px;
}

.hk-summary-next-payment {
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(33, 184, 229, 0.1);
    border: 1px solid rgba(33, 184, 229, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: var(--hk-secondary);
}

/* Recurring Account Section */
.hk-recurring-account {
    background: var(--hk-gray-100);
    border: 2px solid var(--hk-primary-light);
    border-radius: var(--hk-radius-sm);
    padding: 20px;
    margin: 20px 0;
}

.hk-recurring-account h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--hk-secondary);
}

.hk-recurring-note {
    font-size: 13px;
    color: var(--hk-gray-600);
    margin-bottom: 15px;
}

.hk-recurring-account .form-row input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--hk-gray-200);
    border-radius: var(--hk-radius-sm);
    font-size: 14px;
    transition: var(--hk-transition);
}

.hk-recurring-account .form-row input:focus {
    border-color: var(--hk-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--hk-primary-light);
}

.hk-recurring-account .description {
    font-size: 12px;
    color: var(--hk-gray-600);
    margin-top: 6px;
}

/* Checkout Options (anonymous, corporate) */
.hk-checkout-options {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hk-checkout-options .form-row {
    margin-bottom: 0;
    padding: 14px 16px !important;
    border: 2px solid var(--hk-gray-200);
    border-radius: var(--hk-radius-sm);
    background: #fff;
    transition: var(--hk-transition);
}

.hk-checkout-options .form-row:hover {
    border-color: var(--hk-primary);
}

/* Submit Button */
.hk-btn-submit {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    width: 100%;
}

.hk-btn-submit:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
}

/* Required asterisk */
.req {
    color: var(--hk-error);
}

.opt {
    color: var(--hk-gray-400);
    font-weight: 400;
}

/* Hint text */
.hk-hint {
    font-size: 12px;
    color: var(--hk-gray-600);
    margin-top: 4px;
}

/* WooCommerce Checkout Integration */
.hk-wc-checkout {
    margin-top: 20px;
}

.hk-wc-checkout .woocommerce-checkout {
    padding: 0 !important;
    margin: 0 !important;
}

/* ROOT CAUSE FIX: WC col2-set splits checkout into 2 columns */
.hk-wc-checkout .col2-set,
.hk-wc-checkout #customer_details,
.hk-wc-checkout #customer_details.col2-set {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    overflow: visible !important;
}

.hk-wc-checkout .col2-set .col-1,
.hk-wc-checkout .col2-set .col-2,
.hk-wc-checkout #customer_details .col-1,
.hk-wc-checkout #customer_details .col-2,
.hk-wc-checkout .col-1,
.hk-wc-checkout .col-2 {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Billing heading */
.hk-donation-form .hk-wc-checkout .woocommerce-billing-fields h3,
.hk-wc-checkout .woocommerce-billing-fields > h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 0 15px !important;
    padding: 0 !important;
    color: var(--hk-secondary) !important;
    font-style: normal !important;
    font-family: inherit !important;
    border: none !important;
    background: none !important;
}

.hk-wc-checkout .woocommerce-additional-fields h3 {
    display: none !important;
}

/* Hide country field (set via hidden input) */
.hk-wc-checkout #billing_country_field {
    display: none !important;
}

/* Field wrapper grid */
.hk-donation-form .hk-wc-checkout .woocommerce-billing-fields__field-wrapper,
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    width: 100% !important;
}

/* ALL field rows — base: full width */
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper > .form-row,
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper > p {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
    flex: 0 0 100% !important;
}

/* First name / Last name — 50/50 side by side */
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper > .form-row-first,
.hk-wc-checkout #billing_first_name_field {
    width: calc(50% - 6px) !important;
    flex: 0 0 calc(50% - 6px) !important;
    float: none !important;
}

.hk-wc-checkout .woocommerce-billing-fields__field-wrapper > .form-row-last,
.hk-wc-checkout #billing_last_name_field {
    width: calc(50% - 6px) !important;
    flex: 0 0 calc(50% - 6px) !important;
    float: none !important;
}

/* Phone and Email — full width */
.hk-wc-checkout #billing_phone_field,
.hk-wc-checkout #billing_email_field {
    width: 100% !important;
    flex: 0 0 100% !important;
}

/* WC input wrapper — MUST be full width */
.hk-wc-checkout .woocommerce-input-wrapper,
.hk-wc-checkout .form-row .woocommerce-input-wrapper,
.hk-wc-checkout .form-row > span,
.hk-wc-checkout .form-row > .input-text,
.hk-wc-checkout .form-row > .select2-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Nuclear override: ANY input/span inside our checkout must be full width */
.hk-wc-checkout .form-row *,
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper .form-row * {
    max-width: 100% !important;
}

.hk-wc-checkout .form-row .woocommerce-input-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    flex: 1 !important;
}

.hk-wc-checkout .form-row input.input-text,
.hk-wc-checkout .form-row input[type="text"],
.hk-wc-checkout .form-row input[type="email"],
.hk-wc-checkout .form-row input[type="tel"],
.hk-wc-checkout .form-row input[type="password"],
.hk-wc-checkout .form-row select,
.hk-wc-checkout .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Also force the hk-checkout-options and hk-recurring-account inputs */
.hk-checkout-options .woocommerce-input-wrapper,
.hk-recurring-account .woocommerce-input-wrapper {
    display: block !important;
    width: 100% !important;
}

/* Labels */
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper label,
.hk-wc-checkout .form-row label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--hk-secondary) !important;
    margin-bottom: 6px !important;
    font-family: inherit !important;
}

.hk-wc-checkout .form-row label abbr {
    color: var(--hk-error) !important;
    text-decoration: none !important;
}

/* Input fields — ultra specific to override any theme */
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper input.input-text,
.hk-wc-checkout .woocommerce-billing-fields__field-wrapper select,
.hk-wc-checkout .form-row input.input-text,
.hk-wc-checkout .form-row select,
.hk-wc-checkout input[type="text"],
.hk-wc-checkout input[type="email"],
.hk-wc-checkout input[type="tel"],
.hk-wc-checkout input[type="password"],
.hk-wc-checkout select,
.hk-checkout-options input[type="text"],
.hk-recurring-account input[type="password"],
.hk-recurring-account input[type="text"],
.hk-wc-checkout #billing_first_name,
.hk-wc-checkout #billing_last_name,
.hk-wc-checkout #billing_phone,
.hk-wc-checkout #billing_email,
.hk-donation-form .hk-wc-checkout input.input-text,
.hk-donation-form input.input-text,
.hk-donation-form input[type="text"],
.hk-donation-form input[type="email"],
.hk-donation-form input[type="tel"],
.hk-donation-form input[type="password"],
.hk-donation-form select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px 16px !important;
    border: 2px solid var(--hk-gray-200) !important;
    border-radius: var(--hk-radius-sm) !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: var(--hk-secondary) !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: var(--hk-transition) !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.hk-wc-checkout input:focus,
.hk-wc-checkout select:focus,
.hk-donation-form input:focus,
.hk-donation-form select:focus,
.hk-recurring-account input:focus {
    border-color: var(--hk-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px var(--hk-primary-light) !important;
}

.hk-wc-checkout input::placeholder {
    color: var(--hk-gray-400) !important;
}

.hk-wc-checkout #order_review_heading {
    display: none !important;
}

.hk-wc-checkout .woocommerce-checkout-review-order-table {
    display: none !important; /* We show our own summary */
}

.hk-donation-form .hk-wc-checkout .woocommerce-checkout-payment,
.hk-wc-checkout .woocommerce-checkout-payment {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
}

.hk-donation-form .hk-wc-checkout .wc_payment_methods,
.hk-wc-checkout .wc_payment_methods {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    list-style: none !important;
}

.hk-donation-form .hk-wc-checkout .wc_payment_method,
.hk-wc-checkout .wc_payment_method {
    padding: 15px !important;
    border: 2px solid var(--hk-gray-200) !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    list-style: none !important;
}

.hk-wc-checkout .wc_payment_method:hover {
    border-color: var(--hk-primary) !important;
}

.hk-wc-checkout .wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

.hk-wc-checkout .wc_payment_method label img {
    flex-shrink: 0 !important;
}

.hk-wc-checkout .wc_payment_method input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    accent-color: var(--hk-primary) !important;
    margin: 0 !important;
}

.hk-wc-checkout .wc_payment_method img {
    max-height: 28px !important;
    width: auto !important;
}

.hk-donation-form .hk-wc-checkout .payment_box,
.hk-wc-checkout .payment_box {
    background: var(--hk-gray-100) !important;
    border-radius: 8px !important;
    margin-top: 10px !important;
    padding: 15px !important;
    font-size: 13px !important;
    color: var(--hk-gray-600) !important;
    border: none !important;
}

.hk-wc-checkout .payment_box::before {
    display: none !important;
}

.hk-donation-form .hk-wc-checkout .place-order,
.hk-wc-checkout .place-order {
    padding: 20px 0 0 !important;
    margin: 0 !important;
}

.hk-donation-form .hk-wc-checkout #place_order,
.hk-wc-checkout #place_order {
    width: 100% !important;
    padding: 16px 24px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    height: auto !important;
}

.hk-wc-checkout #place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.hk-wc-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 15px;
}

.hk-wc-checkout .woocommerce-privacy-policy-text {
    font-size: 12px;
    color: var(--hk-gray-600);
}

/* Back link */
.hk-back-to-edit {
    margin-bottom: 20px;
}

.hk-back-link {
    color: var(--hk-primary);
    text-decoration: none;
    font-size: 14px;
}

.hk-back-link:hover {
    text-decoration: underline;
}

/* Hide WC form fields we don't need */
.hk-wc-checkout .woocommerce-account-fields,
.hk-wc-checkout .woocommerce-shipping-fields,
.hk-wc-checkout #ship-to-different-address-checkbox,
.hk-wc-checkout .woocommerce-additional-fields,
.hk-wc-checkout .create-account {
    display: none !important;
}

/* Reset WC form-row defaults */
.hk-wc-checkout .form-row::before,
.hk-wc-checkout .form-row::after {
    display: none !important;
}

/* Checkout options (anonymous, corporate) */
.hk-checkout-options {
    margin: 20px 0 !important;
    padding: 0 !important;
}

.hk-checkout-options p.form-row {
    padding: 0 !important;
    margin: 0 0 12px !important;
}

.hk-checkout-options label.checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    border: 2px solid var(--hk-gray-200) !important;
    border-radius: var(--hk-radius-sm) !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: var(--hk-secondary) !important;
    transition: var(--hk-transition) !important;
    margin: 0 !important;
    background: #fff !important;
}

.hk-checkout-options label.checkbox:hover {
    border-color: var(--hk-primary) !important;
}

.hk-checkout-options input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    accent-color: var(--hk-primary) !important;
    margin: 0 !important;
}

/* Recurring Account Section */
.hk-recurring-account {
    background: var(--hk-gray-100) !important;
    border: 2px solid var(--hk-primary-light) !important;
    border-radius: var(--hk-radius-sm) !important;
    padding: 20px !important;
    margin: 20px 0 !important;
}

.hk-recurring-account h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 8px !important;
    color: var(--hk-secondary) !important;
    font-style: normal !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.hk-recurring-note {
    font-size: 13px !important;
    color: var(--hk-gray-600) !important;
    margin-bottom: 15px !important;
}

.hk-recurring-account .form-row {
    padding: 0 !important;
    margin: 0 !important;
}

.hk-recurring-account .description {
    font-size: 12px !important;
    color: var(--hk-gray-600) !important;
    margin-top: 6px !important;
}

/* WC validation error styles */
.hk-wc-checkout .woocommerce-invalid input.input-text {
    border-color: var(--hk-error) !important;
}

.hk-wc-checkout .woocommerce-error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: var(--hk-radius-sm) !important;
    color: #991b1b !important;
    padding: 12px 16px !important;
    margin-bottom: 15px !important;
    list-style: none !important;
}

.hk-wc-checkout .woocommerce-error li {
    list-style: none !important;
}

/* WC notices inside form */
.hk-donation-form .woocommerce-error,
.hk-donation-form .woocommerce-message,
.hk-donation-form .woocommerce-info {
    border-radius: var(--hk-radius-sm) !important;
    margin-bottom: 15px !important;
}

/* ========================================================
   THEME OVERRIDE — Nuclear specificity for stubborn themes
   (WoodMart, Flavflavor, Astra, OceanWP, etc.)
   ======================================================== */
body .hk-donation-form .hk-wc-checkout .woocommerce form.checkout .form-row,
body .hk-donation-form .hk-wc-checkout .woocommerce .form-row,
body .hk-wc-checkout .woocommerce form .form-row,
body .hk-wc-checkout form.checkout .form-row,
body .hk-wc-checkout .form-row {
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

body .hk-donation-form .hk-wc-checkout .form-row-wide,
body .hk-wc-checkout .form-row-wide,
body .hk-wc-checkout #billing_phone_field,
body .hk-wc-checkout #billing_email_field {
    width: 100% !important;
    flex: 0 0 100% !important;
}

body .hk-donation-form .hk-wc-checkout .form-row-first,
body .hk-wc-checkout .form-row-first,
body .hk-wc-checkout #billing_first_name_field {
    width: calc(50% - 6px) !important;
    flex: 0 0 calc(50% - 6px) !important;
}

body .hk-donation-form .hk-wc-checkout .form-row-last,
body .hk-wc-checkout .form-row-last,
body .hk-wc-checkout #billing_last_name_field {
    width: calc(50% - 6px) !important;
    flex: 0 0 calc(50% - 6px) !important;
}

body .hk-donation-form .hk-wc-checkout .woocommerce-input-wrapper,
body .hk-wc-checkout .woocommerce form .form-row .woocommerce-input-wrapper,
body .hk-wc-checkout .form-row .woocommerce-input-wrapper,
body .hk-wc-checkout .woocommerce-input-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body .hk-donation-form .hk-wc-checkout input.input-text,
body .hk-donation-form .hk-wc-checkout select,
body .hk-wc-checkout .woocommerce form .form-row input.input-text,
body .hk-wc-checkout .woocommerce form .form-row select,
body .hk-wc-checkout input.input-text,
body .hk-wc-checkout select,
body .hk-wc-checkout input#billing_first_name,
body .hk-wc-checkout input#billing_last_name,
body .hk-wc-checkout input#billing_phone,
body .hk-wc-checkout input#billing_email {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}
