/* ============================================
   FORM PAGE - Professional Layout (Self-Contained)
   No dependency on main section/container styles
   ============================================ */

/* Page base - full page gradient background */
body.form-page {
    overflow-x: hidden;
    background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 50%, #bfdbfe 100%);
}

/* Prevent edge clipping - allow shadows/borders to render */
.form-page-main,
.form-page-inner {
    overflow: visible;
}

/* Main content area - extra padding so form shadow/edges aren't clipped */
.form-page-main {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 95px 32px 48px;
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
    box-sizing: border-box;
}

.form-page-inner {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 12px;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.form-desc {
    font-size: 15px;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

/* Form - no card container, full page layout */
.project-form {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Form sections */
.form-block {
    margin-bottom: 28px;
}

.form-block:last-of-type {
    margin-bottom: 0;
}

.form-block-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px;
    padding: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
}

.required {
    color: #dc2626;
}

/* Radio buttons */
.form-radio-group {
    display: flex;
    gap: 12px;
}

.form-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-radio-label:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-radio-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
}

.form-radio-label input:checked + .form-radio-custom {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: inset 0 0 0 4px #fff;
}

.form-radio-label input:checked ~ span:last-child {
    font-weight: 600;
    color: #2563eb;
}

/* Checkboxes */
.form-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-checkbox-label:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-checkbox-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.form-checkbox-label input:checked + .form-checkbox-custom {
    background: #2563eb;
    border-color: #2563eb;
}

.form-checkbox-label input:checked + .form-checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #fff;
}

.form-options-hidden {
    display: none !important;
}

/* Inputs */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
}

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(37, 99, 235, 0.2);
}

.form-actions .btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.form-actions .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #475569;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.form-actions .btn-outline:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* Footer */
.form-page-footer {
    text-align: center;
    padding: 24px 16px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.form-page-footer p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.form-page-footer .footer-visitors {
    margin-top: 0.5rem;
}

.form-page-footer .footer-visitors i {
    margin-right: 0.25rem;
    color: #2563eb;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .form-page-main {
        padding: 90px 20px 32px;
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .form-header {
        margin-bottom: 24px;
    }

    .form-title {
        font-size: 24px;
    }

    .form-block {
        margin-bottom: 24px;
    }

    .form-radio-group {
        flex-direction: column;
    }

    .form-checkbox-grid {
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        flex-direction: column;
        margin-top: 24px;
    }

    .form-actions .btn-primary,
    .form-actions .btn-outline {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .form-page-main {
        padding: 85px 16px 28px;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(28px, env(safe-area-inset-bottom));
    }

    .project-form {
        padding: 20px 16px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-actions .btn-primary,
    .form-actions .btn-outline {
        min-height: 48px;
        padding: 14px 20px;
    }

    .form-page-footer {
        padding: 20px 16px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
