/**
 * Form Styles - Premium Dark Mode & Light Mode
 */

/* ========== Light Mode Variables & Overrides ========== */
[data-theme="light"] .form-progress {
    margin-bottom: 3rem;
}

[data-theme="light"] .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .step-number {
    background: white;
    border-color: #cbd5e1;
    color: var(--text-secondary);
}

[data-theme="light"] .progress-step.active .step-number {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

[data-theme="light"] .project-form,
[data-theme="light"] .contact-form-wrapper,
[data-theme="light"] .contact-info-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .form-step h2,
[data-theme="light"] .contact-info-block h3,
[data-theme="light"] .profile-card h3 {
    color: var(--text-main);
}

[data-theme="light"] .form-group label {
    color: var(--text-main);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
}

[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .profile-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .profile-card.selected {
    background: #eff6ff;
    border-color: var(--primary);
}

[data-theme="light"] .profile-card ul {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .profile-card ul li {
    color: var(--text-secondary);
}

[data-theme="light"] .checkbox-label {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .checkbox-label:hover {
    background: #f1f5f9;
}

[data-theme="light"] .checkbox-label span {
    color: var(--text-main);
}

/* ========== Progress Bar ========== */
.form-progress {
    margin-bottom: 3rem;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--primary);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: all 0.3s;
    cursor: default;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    border-color: var(--primary);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: #10b981;
    /* Success Green */
    color: white;
    border-color: #10b981;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========== Form Container ========== */
.project-form,
.contact-form-wrapper,
.contact-info-wrapper {
    background: rgba(15, 15, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-step {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.form-step.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* ========== Profile Choice (Cards) ========== */
.profile-choice {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.profile-card.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.profile-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.profile-card h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.profile-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.profile-card ul {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
}

.profile-card ul li {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #cbd5e1;
    display: flex;
    gap: 0.5rem;
}

.profile-card ul li::before {
    content: "✓";
    color: var(--primary);
}

/* ========== Inputs & Controls ========== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input[type="file"] {
    background: rgba(255, 255, 255, 0.05);
    /* fix background */
    padding: 2rem !important;
    /* larger touch target */
    text-align: center;
    cursor: pointer;
}

small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Amount minimum note - more visible */
.amount-note {
    color: #fbbf24;
    font-weight: 500;
    background: rgba(251, 191, 36, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #fbbf24;
}

/* ========== Checkboxes ========== */
.checkbox-label {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
}

.checkbox-label span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ========== Navigation Actions ========== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    border-color: white;
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* ========== Contact Grid ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.contact-info-block {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
}

.contact-info-block:last-child {
    border: none;
}

.contact-info-block h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: white;
}

.contact-info-block p,
.contact-info-block a {
    color: var(--text-secondary);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {

    .project-form,
    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 1.5rem;
    }

    .profile-choice {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    /* Compact Progress Bar for Mobile */
    .step-label {
        display: none;
    }

    .progress-steps {
        gap: 0.25rem;
        justify-content: space-evenly;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {

    .project-form,
    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 1rem;
    }

    .form-step h2 {
        font-size: 1.5rem;
    }

    .step-description {
        font-size: 0.95rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .profile-card h3 {
        font-size: 1.25rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* ========== Custom Toast Notifications ========== */
.custom-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
    /* Let clicks pass through container */
}

.custom-toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: auto;
    /* Re-enable clicks on toasts */
    cursor: pointer;
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.hide {
    transform: translateX(10px);
    opacity: 0;
}

.custom-toast-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.custom-toast-content {
    flex: 1;
    line-height: 1.4;
}

.custom-toast-title {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Toast Variants */
.custom-toast.error {
    border-left-color: #ef4444;
    background: rgba(20, 10, 10, 0.95);
}

.custom-toast.error .custom-toast-icon {
    color: #ef4444;
}

.custom-toast.success {
    border-left-color: #10b981;
    background: rgba(10, 20, 15, 0.95);
}

.custom-toast.success .custom-toast-icon {
    color: #10b981;
}

.custom-toast.warning {
    border-left-color: #f59e0b;
}

.custom-toast.warning .custom-toast-icon {
    color: #f59e0b;
}

@media (max-width: 600px) {
    .custom-toast-container {
        right: 10px;
        left: 10px;
        top: 10px;
        max-width: 100%;
    }
}