/* Modern, Tailwind-inspired donation form styles */

.adpg-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.adpg-form .form-section {
    margin-bottom: 2rem;
}

.adpg-form h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.adpg-form .form-row {
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.adpg-form .form-row > * {
    flex: 1;
}

.adpg-form input[type="text"],
.adpg-form input[type="email"],
.adpg-form input[type="number"],
.adpg-form select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.adpg-form input[type="text"]:focus,
.adpg-form input[type="email"]:focus,
.adpg-form input[type="number"]:focus,
.adpg-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.adpg-form select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Month and year selects handled by flex in .form-row */

.adpg-form #card-cvv {
    max-width: 150px;
    flex: 0 0 150px;
}

.adpg-form button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: #3b82f6;
    border: 1px solid #3b82f6;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.adpg-form button[type="submit"]:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.adpg-form button[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.adpg-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.adpg-form .adpg-form-messages {
    margin-bottom: 1.5rem;
}

.adpg-form .adpg-message {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.adpg-form .adpg-message.success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.adpg-form .adpg-message.error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.adpg-form .adpg-message p {
    margin: 0 0 0.5rem 0;
}

.adpg-form .adpg-message p:last-child {
    margin-bottom: 0;
}

.adpg-form .adpg-message ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.adpg-form .adpg-message li {
    margin-bottom: 0.25rem;
}

.adpg-form .adpg-message li:last-child {
    margin-bottom: 0;
}

/* Test mode notices */
.adpg-test-mode-notice,
.test-card-notice {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.adpg-test-mode-notice {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    text-align: center;
    font-weight: 500;
}

.test-card-notice {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.875rem;
}

.test-card-notice p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.test-card-notice ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.test-card-notice li {
    margin-bottom: 0.25rem;
}

.test-card-notice li:last-child {
    margin-bottom: 0;
}

.adpg-form .form-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .adpg-form {
        margin: 1rem;
    }
}

/* Hide labels (screen reader only) */
.adpg-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
