/* Mobile-First Responsive Design for Pro Honda Registration Form */

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
}

/* Main Container - Mobile First */
.form-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.main-title {
    color: #e31937;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
}

.sub-title {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
}

.info-section {
    margin-top: 10px;
    text-align: center;
}

.event-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    text-align: center;
}

.disclaimer {
    font-size: 0.8rem;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.5;
    text-align: center;
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 20px 0;
}

/* Form Wrapper */
.form-wrapper {
    padding: 0;
}

.form-title {
    font-size: 0.7rem;
    color: #333;
/*    margin-bottom: 24px;*/
    padding-bottom: 8px;
    border-bottom: 2px solid #e31937;
    position: relative;
}

    .form-title::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 2px;
        background: #ff4757;
    }

/* Form Styles */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
    font-size: 0.95rem;
}

.required {
    color: #e31937;
    font-weight: 700;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #e1e5e9;
    border-radius: 2px;
    font-size: 12px;
    background: #fff;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .form-control:focus {
        outline: none;
        border-color: #e31937;
        box-shadow: 0 0 0 3px rgba(227, 25, 55, 0.1);
        transform: translateY(-1px);
    }

.form-group label {
    font-weight: 700;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.7em;
}

.form-group-flex {
    display: flex;
    gap: 10px;
}

/* Select Styling */
select.form-control {
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
}

/* Form Text and Help */
.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.4;
}

/* Form Row for Date/Time */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.col-md-6 {
    flex: 1;
}

/* Feedback Info */
.feedback-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.char-count {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
}

    .char-count.warning {
        color: #e31937;
        font-weight: 600;
    }

/* Button Styles */
.form-action {
    text-align: center;
    margin-top: 32px;
}

.btn-primary {
    background: linear-gradient(135deg, #e31937, #ff4757);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    position: relative;
    overflow: hidden;
}

    .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .btn-primary:hover::before {
        left: 100%;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(227, 25, 55, 0.3);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        background: #6c757d;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

        .btn-primary:disabled::before {
            display: none;
        }

.form-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 12px;
    line-height: 1.4;
}

/* Loading States */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-loading::after {
        content: '';
        width: 12px;
        height: 12px;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Validation Styles */
.form-control:invalid:not(:placeholder-shown) + .form-text {
    color: #dc3545;
}

.form-control:valid + .form-text {
    color: #28a745;
}

/* Focus Management */
.form-group:focus-within .form-label {
    color: #e31937;
}

/* ==================================== */
/* Responsive Styles           */
/* ==================================== */

/* Small Screens & Tablets */
@media (min-width: 480px) {
    .form-container {
        padding: 32px;
    }

    .main-title {
        font-size: 1.5rem;
    }

    .sub-title {
        font-size: 1rem;
    }

    .event-info,
    .disclaimer {
        font-size: 0.9rem;
    }

    .registration-form {
        gap: 20px;
    }

    .form-control {
        padding: 6px 8px;
        font-size: 14px;
    }

    .form-group label {
        font-weight: 700;
        margin-bottom: 5px;
        color: #555;
        font-size: 0.7em;
    }
    .form-label {
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 8px 16px;
        font-size: 1.1rem;
        max-width: 320px;
    }
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .form-container {
        max-width: 700px;
        padding: 40px;
    }

    .main-title {
        font-size: 2rem;
    }

    .sub-title {
        font-size: 1.1rem;
    }

    .event-info,
    .disclaimer {
        font-size: 1rem;
    }

    .registration-form {
        gap: 10px;
    }

    .form-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .form-group label {
        font-weight: 700;
        margin-bottom: 5px;
        color: #555;
        font-size: 0.9em;
    }

    .form-row {
        flex-direction: row;
        gap: 24px;
    }

    .form-control {
        padding: 4px 6px;
        font-size: 16px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 1.2rem;
    }
}

/* Large Desktop */
@media (min-width: 992px) {
    .form-container {
        max-width: 850px;
        padding: 56px;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .sub-title {
        font-size: 1.5rem;
    }

    .form-title {
        font-size: 1rem;
    }

    .form-group label {
        font-size: 0.9em;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 1.3rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .form-container {
        box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(357deg, #000000 0%, #82a6c7 100%); /* Darker, more muted background */
        color: #ecf0f1; /* Light text for readability */
    }

    .form-container {
        background: #34495e; /* Darker container background */
        color: #ecf0f1; /* Light text inside the container */
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); /* Stronger shadow for depth */
    }

    /* Header Styles */
    .main-title {
        color: #ff0000; /* A brighter red for dark mode */
    }

    .sub-title {
        color: #f5f6fa; /* A very light grey for contrast */
    }

    .event-info {
        color: #fff; /* Lighter grey for event info */
    }

    .disclaimer {
        color: #fff; /* Lighter grey for disclaimer */
    }

    .divider {
        background: linear-gradient(90deg, transparent, #555, transparent); /* Darker divider */
    }

    /* Form Wrapper */
    .form-title {
        color: #ecf0f1; /* Light text for form titles */
        border-bottom-color: #ff6b81; /* Brighter red for the underline */
    }

        .form-title::after {
            background: #ff8e9b; /* Slightly different red for the accent line */
        }

    /* Form Labels */
    .form-group label {
        color: #fff; /* Lighter grey for form labels */
    }

    .required {
        color: #ff6b81; /* Brighter red for required indicator */
    }

    /* Form Controls */
    .form-control {
        background: #2c3e50; /* Darker input background */
        border-color: #b0bec5; /* Slightly darker border */
        color: #ecf0f1; /* Light text in inputs */
    }

        .form-control:focus {
            border-color: #ff6b81; /* Brighter red focus border */
            box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.2); /* Redder, more visible shadow */
            background: #2c3e50; /* Maintain dark background on focus */
        }

    /* Select Styling - Ensure arrow is visible */
    select.form-control {
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23ecf0f1" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); /* Inverted arrow for dark mode */
    }

    /* Form Text and Help */
    .form-text {
        color: #a0aec0; /* Lighter grey for helper text */
    }

    /* Feedback Info */
    .char-count {
        color: #a0aec0;
    }

        .char-count.warning {
            color: #ff6b81; /* Brighter red for warning text */
        }

    /* Button Styles */
    .btn-primary {
        background: linear-gradient(135deg, #c1001d, #ff0000); /* Slightly brighter gradient for dark mode */
        color: #fff; /* White text remains good */
        box-shadow: 0 4px 15px rgba(255, 107, 129, 0.3); /* Softer shadow */
    }

        .btn-primary:hover {
            box-shadow: 0 8px 25px rgba(255, 107, 129, 0.5); /* More pronounced hover shadow */
        }

        .btn-primary:disabled {
            background: #5a6268; /* Darker grey for disabled button */
            color: #bdc3c7; /* Lighter text for disabled */
        }

    /* Validation Styles */
    .form-control:invalid:not(:placeholder-shown) + .form-text {
        color: #e74c3c; /* Redder error message */
    }

    .form-control:valid + .form-text {
        color: #2ecc71; /* Greener success message */
    }

    /* Focus Management */
    .form-group:focus-within .form-label {
        color: #ff6b81; /* Brighter red for focused label */
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .btn-primary {
        background: #e31937 !important;
        -webkit-print-color-adjust: exact;
    }
}
