/* Chapel Memorial Service Form Styles - Aligned with Memorial Garden */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2c5aa0;
}

.header h1 {
    color: #2c5aa0;
    margin-bottom: 10px;
    font-size: 2em;
}

.header p {
    color: #666;
}

.section {
    margin-bottom: 30px;
}

.section-title,
.section h2 {
    color: #2c5aa0;
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Four column layout for address fields */
.four-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.four-col .form-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.checkbox-group {
    margin: 10px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-right: 8px;
}

.checkbox-item label {
    display: inline;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.radio-group {
    margin: 10px 0;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.radio-item input[type="radio"] {
    width: auto;
    margin: 0;
    margin-right: 8px;
}

.radio-item label {
    display: inline;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.required {
    color: red;
}

.submit-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

button[type="submit"] {
    background: #2c5aa0;
    color: #fff;
    padding: 15px 40px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background: #1e3d6f;
}

button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

button[type="button"] {
    background: #6c757d;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button[type="button"]:hover {
    background: #5a6268;
}

.note {
    background: #f0f8ff;
    border-left: 4px solid #2c5aa0;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-note {
    background: #f0f8ff;
    border-left: 4px solid #2c5aa0;
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
}

.fee-note {
    background: #e8f0ff;
    border-left: 4px solid #2c5aa0;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.error {
    background: #f8d7da;
    border-left: 4px solid #f5c6cb;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #721c24;
}

.error-message {
    display: none;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}

.success {
    background: #d4edda;
    border-left: 4px solid #c3e6cb;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #155724;
}

.hidden {
    display: none !important;
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

/* Loading state */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success page styles */
.confirmation-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.confirmation-summary p {
    margin: 10px 0;
}

.thank-you-page {
    display: none;
}

.thank-you-dynamic {
    background: #e8f0ff;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Accessibility utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    border: 0 !important;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .form-row,
    .two-col,
    .four-col {
        grid-template-columns: 1fr;
    }

    .form-row .form-group,
    .two-col .form-group,
    .four-col .form-group {
        margin-bottom: 15px;
    }
}