/* --- Apple Style Design Variables --- */
:root {
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-green: #34c759;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: #d2d2d7;
    --focus-ring: rgba(0, 113, 227, 0.25);
    --radius: 12px;
}

/* --- Global Layout --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

main {
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- Container Styling --- */
.container {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 600px;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin: 0 auto; 
    box-sizing: border-box;
}

/* Utility Class to Hide Elements */
.hidden {
    display: none !important;
}

/* --- Typography --- */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: -0.02em;
}

p.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 40px;
    font-size: 17px;
}

.section-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    width: 100%;
    display: block;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 24px;
}

fieldset.form-section {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.required {
    color: red;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 17px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    background-color: var(--card-bg);
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-primary);
}

input:focus, textarea:focus {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

/* --- File Upload Specific Styling --- */
input[type="file"] {
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background-color: #f2f2f7;
    color: var(--apple-blue);
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e5e5ea;
}

input[type="file"]::file-selector-button:focus {
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
}

.file-help {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* --- Textarea and Counters --- */
textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* --- Checkbox Styling --- */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

input[type="checkbox"] {
    accent-color: var(--apple-blue);
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

/* --- Button Styling --- */
button, .button-link {
    display: inline-block;
    width: 100%;
    background-color: var(--apple-blue);
    color: white;
    border: none;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover, .button-link:hover {
    background-color: var(--apple-blue-hover);
}

button:active, .button-link:active {
    transform: scale(0.98);
}

button:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

.secondary-button {
    background-color: transparent;
    color: var(--apple-blue);
    font-weight: 400;
    font-size: 15px;
    margin-top: 10px;
}

.secondary-button:hover {
    background-color: rgba(0, 113, 227, 0.05);
    text-decoration: underline;
}

/* --- Success View Styling --- */
.success-content {
    text-align: center;
}

.success-icon {
    font-size: 60px;
    color: var(--apple-green);
    margin-bottom: 20px;
}

.payment-note {
    margin-bottom: 30px; 
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
}

.action-buttons {
    margin-top: 20px;
}

/* --- Status / Validation Messages --- */
#status {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    display: none;
    padding: 8px 12px;
    border-radius: var(--radius);
}

#status.error {
    background-color: #fdecea;
    color: #d60000;
}

#status.success {
    background-color: #e6f9f0;
    color: #34c759;
}

/* --- reCAPTCHA Styling Placeholder --- */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 28px;
    }
}