/* Judge Black Payment Form Styles - Premium Card Design */
.jbp-payment-form-container {
    max-width: 520px;
    margin: 2rem auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.jbp-payment-form-container * {
    box-sizing: border-box;
}

/* Main Form Card */
.jbp-form {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 20px -5px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Form Header */
.jbp-form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.jbp-form-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a365d;
    line-height: 1.3;
}

.jbp-form-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Section Cards */
.jbp-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.jbp-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 0 0 1rem 0;
}

/* Form Groups - Clean Separation */
.jbp-form-group {
    margin-bottom: 1.25rem;
}

.jbp-form-group:last-child {
    margin-bottom: 0;
}

.jbp-form-row.jbp-two-columns {
    display: flex;
    gap: 1rem;
}

.jbp-two-columns .jbp-form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Labels */
.jbp-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
}

.jbp-form-group label .required {
    color: #dc2626;
    margin-left: 2px;
}

/* Input Fields */
.jbp-form-group input[type="text"],
.jbp-form-group input[type="email"],
.jbp-form-group input[type="number"] {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #1f2937;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.jbp-form-group input:hover {
    border-color: #cbd5e1;
}

.jbp-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.jbp-form-group input::placeholder {
    color: #9ca3af;
}

/* Amount Field */
.jbp-amount-input {
    position: relative;
}

.jbp-currency {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
}

.jbp-amount-input input {
    padding-left: 2rem !important;
}

.jbp-field-note {
    margin: 0.5rem 0 0 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Totals Card */
.jbp-totals-box {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.jbp-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
}

.jbp-total-row span:last-child {
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.jbp-total-row.jbp-fee-row {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.jbp-total-row.jbp-total-final {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
}

.jbp-total-row.jbp-total-final span:last-child {
    font-size: 1.25rem;
    color: #4ade80;
}

/* Submit Button */
.jbp-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    padding: 0 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.jbp-submit-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.jbp-submit-button:active {
    transform: translateY(0);
}

.jbp-submit-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
}

/* Loading Spinner */
.jbp-submit-button .spinner {
    display: none;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: jbp-spin 0.8s linear infinite;
}

.jbp-submit-button.loading .spinner {
    display: inline-block;
}

.jbp-submit-button.loading .jbp-btn-text {
    display: none;
}

.jbp-submit-button .jbp-btn-loading {
    display: none;
}

.jbp-submit-button.loading .jbp-btn-loading {
    display: inline;
}

@keyframes jbp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Secure Notice */
.jbp-secure-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    color: #64748b;
    font-size: 0.8125rem;
}

.jbp-secure-notice svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #22c55e;
}

/* Error Messages */
.jbp-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jbp-error::before {
    content: "!";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Success and Cancel Messages */
.jbp-message {
    max-width: 480px;
    margin: 2rem auto;
    padding: 3rem 2.5rem;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

.jbp-message-icon {
    margin-bottom: 1.5rem;
}

.jbp-success .jbp-message-icon svg {
    filter: drop-shadow(0 4px 12px rgba(34, 197, 94, 0.3));
}

.jbp-cancelled .jbp-message-icon svg {
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.3));
}

.jbp-message h2 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.jbp-message p {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.jbp-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.jbp-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* Responsive */
@media (max-width: 640px) {
    .jbp-payment-form-container {
        margin: 1rem;
    }
    
    .jbp-form {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .jbp-form-header h2 {
        font-size: 1.375rem;
    }
    
    .jbp-form-row.jbp-two-columns {
        flex-direction: column;
        gap: 0;
    }
    
    .jbp-two-columns .jbp-form-group {
        margin-bottom: 1.25rem;
    }
    
    .jbp-section {
        padding: 1.25rem;
    }
    
    .jbp-totals-box {
        padding: 1.25rem;
    }
    
    .jbp-message {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
}
