/* General Styling */
:root {
    --primary-purple: #6A1B9A; /* Darker Purple */
    --light-purple: #9C27B0; /* Main Purple */
    --accent-purple: #AB47BC; /* Lighter Purple */
    --background-light: #F3E5F5; /* Very Light Purple/Pink */
    --text-dark: #333;
    --text-light: #fff;
    --border-color: #E0BBE4;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Sarabun', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to the top */
    min-height: 100vh;
    box-sizing: border-box;
    padding: 20px; /* Add some padding around the content */
}

.container {
    background-color: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color);
    padding: 30px;
    max-width: 800px;
    width: 100%;
    margin-top: 30px; /* Space from the top */
    margin-bottom: 30px; /* Space from the bottom */
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

header .icon-main {
    font-size: 4rem;
    color: var(--primary-purple);
    margin-bottom: 10px;
}

header h1 {
    color: var(--primary-purple);
    font-size: 2.5rem;
    margin: 10px 0 5px;
    font-weight: 700;
}

header p {
    color: var(--light-purple);
    font-size: 1.2rem;
    margin-top: 0;
}

/* Section Headings */
h2 {
    color: var(--light-purple);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

h2 .icon-heading {
    margin-right: 10px;
    color: var(--primary-purple);
}

/* Form Styling */
.repair-form .form-group {
    margin-bottom: 20px;
}

.repair-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
}

.repair-form label .icon-label {
    margin-right: 8px;
    color: var(--light-purple);
}

.repair-form .required {
    color: #E91E63; /* Red for required fields */
    margin-left: 5px;
}

.repair-form input[type="text"],
.repair-form input[type="tel"],
.repair-form input[type="email"],
.repair-form textarea {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Sarabun', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding and border are included in the width */
}

.repair-form input[type="text"]:focus,
.repair-form input[type="tel"]:focus,
.repair-form input[type="email"]:focus,
.repair-form textarea:focus {
    border-color: var(--light-purple);
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.2);
    outline: none;
}

.repair-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.repair-form .file-upload input[type="file"] {
    width: 100%;
    padding: 10px 0;
    border: none;
    background: none;
    font-size: 1rem;
}

.repair-form .help-text {
    font-size: 0.9rem;
    color: #777;
    margin-top: 5px;
    display: flex;
    align-items: center;
}

.repair-form .help-text .fas {
    margin-right: 5px;
    color: var(--light-purple);
}

/* Buttons */
.btn-submit {
    background-color: var(--primary-purple);
    color: var(--text-light);
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit .fas {
    margin-right: 10px;
}

.btn-submit:hover {
    background-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-purple); /* Keep consistent on active */
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #777;
    font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form field animations (subtle) */
.repair-form .form-group {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Apply delay to each form group sequentially */
.repair-form .form-group:nth-child(1) { animation-delay: 0.6s; }
.repair-form .form-group:nth-child(2) { animation-delay: 0.7s; }
.repair-form .form-group:nth-child(3) { animation-delay: 0.8s; }
.repair-form .form-group:nth-child(4) { animation-delay: 0.9s; }
.repair-form .form-group:nth-child(5) { animation-delay: 1.0s; }
.repair-form .form-group:nth-child(6) { animation-delay: 1.1s; }
.repair-form .form-group:nth-child(7) { animation-delay: 1.2s; }
.repair-form .form-group:nth-child(8) { animation-delay: 1.3s; }
.repair-form .form-group:nth-child(9) { animation-delay: 1.4s; }


@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin-top: 15px;
        margin-bottom: 15px;
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .btn-submit {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header .icon-main {
        font-size: 3rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .repair-form label {
        font-size: 0.95rem;
    }

    .repair-form input,
    .repair-form textarea,
    .repair-form .btn-submit {
        font-size: 0.9rem;
    }
}