/**
 * SPP Modern Form Styles — Shared across all public form pages
 * v2.0 — September 2026
 */

/* ================================================================
   FORM PAGE LAYOUT
   ================================================================ */
.spp-form-page {
    max-width: 840px;
    margin: 0 auto;
    padding: 2.5rem clamp(1rem, 4vw, 2rem) 4rem;
}

/* Form card */
.spp-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(13,27,64,0.07);
    overflow: hidden;
}

/* Section divider within form */
.spp-form-section {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.spp-form-section:last-of-type {
    border-bottom: none;
}

.spp-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.spp-form-section-title svg {
    width: 18px;
    height: 18px;
    stroke: #187D53;
    flex-shrink: 0;
}

/* Input group row */
.spp-form-row {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.spp-form-row--2 { grid-template-columns: 1fr 1fr; }
.spp-form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.spp-form-row--1 { grid-template-columns: 1fr; }

/* Input field wrapper */
.spp-field {}

.spp-field-label {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.spp-field-label .required-dot {
    color: #ef4444;
    margin-left: 2px;
}

.spp-field-input,
.spp-field-select,
.spp-field-textarea {
    width: 100%;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.8125rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.spp-field-input:focus,
.spp-field-select:focus,
.spp-field-textarea:focus {
    border-color: #187D53;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(24, 125, 83, 0.15);
}

.spp-field-input::placeholder,
.spp-field-textarea::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

.spp-field-input.is-invalid,
.spp-field-select.is-invalid,
.spp-field-textarea.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.10);
}

.spp-field-error {
    display: none;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
    margin-top: 0.375rem;
    align-items: center;
    gap: 0.25rem;
}

.spp-field-input.is-invalid ~ .spp-field-error,
.spp-field-select.is-invalid ~ .spp-field-error,
.spp-field-textarea.is-invalid ~ .spp-field-error {
    display: flex;
}

.spp-field-error svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Select arrow */
.spp-field-select {
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
    cursor: pointer;
}

/* File upload */
.spp-field-file {
    width: 100%;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #475569;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.spp-field-file:hover {
    border-color: #187D53;
    background: rgba(52, 204, 103, 0.08);
}

.spp-field-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.375rem;
}

/* Input with addon (e.g., "Ha") */
.spp-input-addon-wrap {
    display: flex;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spp-input-addon-wrap:focus-within {
    border-color: #187D53;
    box-shadow: 0 0 0 3px rgba(24, 125, 83, 0.15);
}

.spp-input-addon-wrap .spp-field-input {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.spp-input-addon-wrap .spp-field-input:focus {
    box-shadow: none;
}

.spp-input-addon {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: #f1f5f9;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    border-left: 1px solid #e2e8f0;
}

/* Form footer / actions */
.spp-form-footer {
    padding: 1.75rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.spp-form-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    background: #187D53;
    border: none;
    border-radius: 9999px;
    padding: 0.8125rem 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(24, 125, 83, 0.25);
}

.spp-form-submit:hover {
    background: #2D649B;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 100, 155, 0.35);
}

.spp-form-submit svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}

.spp-form-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spp-form-cancel:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #334155;
}

/* Security/info banner */
.spp-form-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: rgba(52, 204, 103, 0.08);
    border: 1px solid rgba(52, 204, 103, 0.25);
    border-radius: 0.875rem;
    padding: 1rem 1.25rem;
    margin: 0 2.5rem 0;
}

.spp-form-notice svg {
    width: 22px;
    height: 22px;
    stroke: #187D53;
    flex-shrink: 0;
    margin-top: 1px;
}

.spp-form-notice-text h6,
.spp-form-notice-text .spp-notice-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.spp-form-notice-text p {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .spp-form-section { padding: 1.5rem 1.25rem; }
    .spp-form-footer { padding: 1.5rem 1.25rem; }
    .spp-form-notice { margin: 0 1.25rem; }
    .spp-form-row--2 { grid-template-columns: 1fr; }
    .spp-form-row--3 { grid-template-columns: 1fr; }
    .spp-form-submit { width: 100%; justify-content: center; }
    .spp-form-cancel { width: 100%; justify-content: center; }
}
