/* Unified Form Styles for Crowdveste */
:root {
    --primary: #003E53;
    --secondary: #0894C5;
    --accent: #F96F25;
    --primary-light: rgba(0, 62, 83, 0.1);
    --secondary-light: rgba(8, 148, 197, 0.1);
    --accent-light: rgba(249, 111, 37, 0.1);
    --background: #f8fafc;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 0.8rem;
}

body {
    background-color: var(--background);
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

.form-page {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background);
    padding: 2rem 1rem;
}

.form-container {
    background: white;
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: 0 6px 20px var(--shadow);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.form-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
    text-align: center;
}

.form-container p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
    display: block;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary-light);
    outline: none;
}

.input-group {
    position: relative;
}

.input-group-text {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-light);
    z-index: 1;
    padding-left: 1rem;
    font-size: 0.85rem;
}

.input-with-icon {
    padding-left: 2.25rem;
}

.btn-primary {
    background-color: var(--accent);
    border: none;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.3s;
    color: white;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: #e05a16;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.text-primary {
    color: var(--accent) !important;
}

.text-primary:hover {
    color: #e05a16 !important;
}

.alert {
    border-radius: var(--radius);
    border: none;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Reduce spacing between form elements */
.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

/* International Telephone Input styling */
.iti {
    width: 100%;
    display: block;
}

.intl-tel-input {
    width: 100% !important;
}

.intl-tel-input .country-list {
    background-color: white !important;
    z-index: 1050 !important;
    position: absolute;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.intl-tel-input .form-control {
    width: 100% !important;
    padding-left: 52px !important;
    border-radius: var(--radius) !important;
    border: 1px solid var(--border);
    height: calc(2.25rem + 2px);
}

.intl-tel-input .selected-flag {
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0 10px;
}

.intl-tel-input .selected-flag:focus {
    outline: none;
}

.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag {
    background-color: var(--primary-light);
}

/* Form rows and columns layout for multi-column forms */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.form-col {
    flex: 1;
    min-width: 48%;
}

/* Upload components styles */
.upload-box {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    background-color: #f9f9f9;
}

.upload-box:hover {
    border-color: var(--primary);
    background-color: #eef6ff;
}

.preview-image {
    width: 100%;
    border-radius: var(--radius);
    margin-top: 10px;
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .form-page {
        padding: 1rem 0.75rem;
        align-items: flex-start;
    }

    .form-container {
        padding: 1.5rem 1.25rem;
        margin-top: 1rem;
        border-radius: 0.6rem;
    }

    .form-container h2 {
        font-size: 1.3rem;
    }

    .form-container p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 0.5rem 0.75rem;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
    }

    .form-col {
        min-width: 100%;
    }
}
