/* ==========================================
   BASE STYLES
   ========================================== */

body {
    margin: 0;
    font-family: "Open Sans", Roboto, Arial, sans-serif;
    background: url("/public/img/flex-background.jpg") no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: #333;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ==========================================
   LAYOUT & CONTAINER
   ========================================== */

.container {
    position: relative;
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 1100px;
    margin: 1.2rem auto;
    padding: 1.8rem 2rem;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 1rem;
}

.header h1 {
    color: #e52b2b;
    font-style: italic;
    font-size: 2.3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 1rem;
    color: #444;
    font-weight: 500;
    margin-top: 0.3rem;
    letter-spacing: 0.2px;
}

/* ==========================================
   FORM SECTIONS
   ========================================== */

.section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1976d2;
    margin: 0 0 0.5rem 0;
}

.section h3 {
    font-size: 1rem;
    color: #0066cc;
    margin-bottom: 0.6rem;
}

.section-privacy {
    margin-top: 2rem;
}

/* ==========================================
   FORM GRID & LAYOUT
   ========================================== */

.form-grid {
    display: grid;
    gap: 0.5rem 1rem;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid.two-col .form-group {
    margin-bottom: 0.5rem;
}

.form-split {
    display: flex;
    gap: 1.8rem;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.form-block {
    flex: 1 1 50%;
    min-width: 0;
    background: #ffffff0d;
    border-radius: 8px;
    padding: 0.1rem 1.2rem;
    box-sizing: border-box;
}

.form-block .form-group {
    margin-bottom: 0.6rem;
}

/* ==========================================
   FORM CONTROLS
   ========================================== */

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: block;
}

input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    border: 1px solid #c9c9c9;
    border-radius: 5px;
    font-size: 0.9rem;
    background-color: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

input::placeholder {
    color: #777;
    font-style: italic;
    opacity: 0.9;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: auto;
    flex-shrink: 0;
    cursor: pointer;
}

/* ==========================================
   BUTTONS
   ========================================== */

.actions {
    text-align: center;
    margin: 1.8rem 0 0.8rem 0;
}

.btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease-in-out, transform 0.1s ease;
}

.btn.primary {
    background: #1976d2;
    color: #fff;
}

.btn.primary:hover {
    background: #125cb5;
    transform: translateY(-1px);
}

.btn.secondary {
    background: #6c757d;
    color: #fff;
    margin-left: 0.5rem;
}

.btn.secondary:hover {
    background: #565e64;
    transform: translateY(-1px);
}

/* ==========================================
   LINKS
   ========================================== */

.checkbox-label a,
.signin a {
    color: #1976d2;
    text-decoration: none;
}

.checkbox-label a:hover,
.signin a:hover {
    text-decoration: underline;
}

.signin {
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================
   MESSAGES & ALERTS
   ========================================== */

.error {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.alert.error {
    background: #ffebee;
    border-left: 3px solid #d32f2f;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.info {
    background: #f1f7ff;
    color: #0d47a1;
    padding: 0.8rem 1rem;
    border-left: 3px solid #007bff;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
}

.info-box {
    background: #f5f5f5;
    border-left: 4px solid #1976d2;
    border-radius: 6px;
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
}

.info-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1976d2;
    margin: 0 0 0.8rem 0;
}

.info-box ol {
    margin: 0;
    padding-left: 1.5rem;
}

.info-box ol li {
    padding: 0.4rem 0;
    line-height: 1.5;
    color: #555;
}

.note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1.5rem;
}

/* ==========================================
   SUCCESS & CONFIRMATION PAGES
   ========================================== */

.success-content {
    text-align: center;
    padding: 3rem 1rem 2.5rem 1rem;
}

.success-content h2 {
    color: #1976d2;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0.4rem 0 1.2rem 0;
}

.success-content .actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.success-content .actions .btn {
    min-width: 150px;
}

.success-icon {
    font-size: 4.5rem;
    font-weight: bold;
    width: 90px;
    height: 90px;
    line-height: 90px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
}

.success-icon.check {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.15);
}

.success-icon.warning {
    font-family: "Segoe UI Symbol", "Segoe UI", Arial, sans-serif;
    font-weight: 300;
    color: #ff9800;
    background: rgba(255, 152, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon.warning > * {
    position: relative;
    top: -2px;
}

.success-message {
    max-width: 640px;
    margin: 0 auto 1.8rem auto;
    text-align: left;
    line-height: 1.65;
    color: #333;
}

.success-message p {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: #444;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1024px) {
    .form-split {
        flex-wrap: wrap;
    }

    .form-block {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
        margin: 1rem;
    }

    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }

    .btn.secondary {
        margin-left: 0;
    }

    .success-content .actions {
        flex-direction: column;
    }

    .success-content .actions .btn {
        width: 100%;
    }
}