/* Main Container */
.anpf-payment-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #ffffff !important; /* White text */
    background-color: #000000 !important; /* Black background */
    min-height: 100vh;
}

/* Form Sections */
.anpf-form-section {
    background: rgba(40, 40, 40, 0.9); /* Darker background for form sections */
    border: 1px solid #444;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.anpf-form-section h3 {
    margin-top: 0;
    color: #ffffff !important;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Form Rows and Columns */
.anpf-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
}

.anpf-form-col {
    padding: 0 10px;
    margin-bottom: 10px;
    flex: 1 0 100%;
}

.anpf-form-col-6 {
    flex: 0 0 calc(50% - 20px);
}

.anpf-form-col-3 {
    flex: 0 0 calc(25% - 20px);
}

/* Form Elements */
.anpf-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #ffffff !important;
}

.anpf-form-row input[type="text"],
.anpf-form-row input[type="email"],
.anpf-form-row input[type="number"],
.anpf-form-row input[type="tel"],
.anpf-form-row select,
.anpf-form-row textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #333 !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.anpf-form-row input:focus,
.anpf-form-row select:focus,
.anpf-form-row textarea:focus {
    border-color: #4a9fe0;
    box-shadow: 0 0 0 1px #4a9fe0;
    outline: 2px solid transparent;
    background-color: #444 !important;
}

.anpf-form-row textarea {
    min-height: 80px;
}

/* Buttons */
.anpf-form-actions {
    text-align: right;
    margin-top: 20px;
}

#anpf-submit-btn {
    position: relative;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 40px;
    background: #4a9fe0;
    border-color: #4a9fe0;
    color: #ffffff !important;
    cursor: pointer;
    text-shadow: none;
    transition: all 0.2s ease-in-out;
}

#anpf-submit-btn:hover:not(:disabled) {
    background: #135e96;
    border-color: #135e96;
    color: #ffffff !important;
}

#anpf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.anpf-spinner {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

/* Messages */
.anpf-message {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    color: #ffffff !important;
}

.anpf-message.error {
    background-color: #dc3545;
    border: 1px solid #f5c6cb;
}

.anpf-message.success {
    background-color: #28a745;
    border: 1px solid #c3e6cb;
}

.anpf-success-message {
    background-color: rgba(40, 40, 40, 0.9);
    border: 1px solid #444;
    color: #ffffff !important;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
}

.anpf-success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

/* Focus styles */
.anpf-form-row input:focus-visible,
.anpf-form-row select:focus-visible,
.anpf-form-row textarea:focus-visible {
    outline: 2px solid #4a9fe0;
    outline-offset: 2px;
}

/* Button hover effect */
#anpf-submit-btn:hover {
    background: #3a8fd0;
    border-color: #3a8fd0;
}

/* Invalid fields */
.anpf-form-row input.invalid,
.anpf-form-row select.invalid,
.anpf-form-row textarea.invalid {
    border-color: #dc3545;
    background-color: #3a1e1f;
}

/* Form descriptions */
.anpf-form-row .description {
    color: #aaa !important;
    font-size: 0.9em;
    margin-top: 5px;
    font-style: italic;
}

/* Global styles for better dark theme */
body {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Ensure all text is visible */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

/* Style for select dropdowns */
select {
    background-color: #333333 !important;
    color: #ffffff !important;
    border: 1px solid #555555;
}

/* Style for select dropdown options */
option {
    background-color: #333333 !important;
    color: #ffffff !important;
}

/* Style for disabled elements */
:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Style for placeholders */
::placeholder {
    color: #aaaaaa !important;
    opacity: 1;
}

/* Style for links */
a {
    color: #4a9fe0 !important;
    text-decoration: none;
}

a:hover {
    color: #3a8fd0 !important;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .anpf-form-col-6,
    .anpf-form-col-3 {
        flex: 0 0 100%;
    }
    
    .anpf-form-actions {
        text-align: center;
    }
    
    #anpf-submit-btn {
        width: 100%;
    }
}

/* Loading State */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.anpf-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.anpf-loading:after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
