:root {
    --wp-admin-theme-color: #2271b1;
    --wp-admin-theme-color-darker-10: #135e96;
    --wp-admin-theme-color-darker-20: #0a4b78;
    --primary-color: var(--wp-admin-theme-color, #2271b1);
    --primary-dark: var(--wp-admin-theme-color-darker-10, #135e96);
    --primary-darker: var(--wp-admin-theme-color-darker-20, #0a4b78);
    --success-color: #00a32a;
    --error-color: #d63638;
    --border-color: #dcdcde;
    --background-light: #f6f7f7;
    --text-color: #1d2327;
    --text-light: #50575e;
}

.dsa-registration-form {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* Collapsible Section Styles */
.dsa-section {
    border-bottom: 1px solid var(--border-color);
}

.dsa-section:last-of-type {
    border-bottom: none;
}

.dsa-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    cursor: pointer;
    background: var(--background-light);
    transition: background 0.2s ease;
    user-select: none;
}

.dsa-section-header:hover {
    background: #e8e9ea;
}

.dsa-section-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    flex-grow: 1;
}

.dsa-section-toggle {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    font-weight: bold;
}

.dsa-section.collapsed .dsa-section-toggle {
    transform: rotate(-90deg);
}

.dsa-section-content {
    padding: 2rem 2.5rem;
    display: block;
}

.dsa-section.collapsed .dsa-section-content {
    display: none;
}

/* Legacy h2 support (non-collapsible) */
.dsa-registration-form > h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 2.5rem 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--text-color);
    font-size: 1.3rem;
}

.dsa-registration-form > h2:first-of-type {
    margin-top: 0;
}

.dsa-field-group {
    margin-bottom: 1.5rem;
}

.dsa-field-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.dsa-field-group input[type="text"],
.dsa-field-group input[type="email"],
.dsa-field-group input[type="tel"],
.dsa-field-group input[type="date"],
.dsa-field-group select,
.dsa-field-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dsa-field-group textarea {
    resize: vertical;
    font-family: inherit;
}

.dsa-field-group input:focus,
.dsa-field-group select:focus,
.dsa-field-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.dsa-field-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.dsa-submit {
    margin-top: 0;
    padding: 2rem 2.5rem;
    text-align: center;
    background: var(--background-light);
    border-radius: 0 0 8px 8px;
}

.dsa-button {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 3rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.dsa-button:hover {
    background: var(--primary-dark);
}

.dsa-button:active {
    transform: scale(0.98);
}

.dsa-button-secondary {
    background: #50575e;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dsa-button-secondary:hover {
    background: #3c434a;
}

.dsa-error {
    background: #fcf0f1;
    color: var(--error-color);
    padding: 1rem;
    border-left: 4px solid var(--error-color);
    border-radius: 4px;
    margin: 1.5rem 2.5rem;
}

.dsa-success {
    background: #edfaef;
    color: var(--success-color);
    padding: 1rem;
    border-left: 4px solid var(--success-color);
    border-radius: 4px;
    margin: 1.5rem 2.5rem;
    font-weight: 600;
}

.dsa-notice {
    padding: 1rem;
    background: #f0f6fc;
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

/* Section Status Indicator */
.dsa-section-status {
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: normal;
}

.dsa-section-status.completed {
    color: var(--success-color);
}

/* Responsive */
@media (max-width: 768px) {
    .dsa-registration-form {
        margin: 1rem;
        border-radius: 4px;
    }
    
    .dsa-section-header,
    .dsa-section-content,
    .dsa-submit,
    
    .dsa-registration-form h2,
    .dsa-section-header h2 {
        font-size: 1.15rem;
    }
    
    .dsa-button {
        width: 100%;
        padding: 1rem 1.5rem;
    }
}

/* Animation for collapse */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dsa-section-content {
    animation: slideDown 0.3s ease;
}
