/**
 * CSS styles for the Barco Projector Repair Booking Form.
 *
 * @package RepairRequestManager
 */

/* Tailwind CSS is assumed to be loaded externally, so these are custom overrides/additions */
/* Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base styles for form container */
.repair-request-form-wrapper {
    font-family: "Inter", sans-serif;
    background-color: #f3f4f6; /* Light gray background */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top */
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.repair-form {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    margin: 20px auto; /* Center the form and add some vertical margin */
}

/* Styling for form sections */
.form-section {
    background-color: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-top: 24px;
}

.section-title {
    font-size: 1.5rem; /* 24px */
    font-weight: 600; /* semibold */
    color: #374151; /* gray-700 */
    margin-bottom: 16px;
}

/* Styling for form groups and inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #4a5568;
    transition: border-color 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Add subtle shadow */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="file"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-group textarea {
    resize: vertical;
}

/* Styling for checkbox and radio groups */
.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-item, .radio-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 150px; /* Adjust as needed */
    justify-content: center;
}

.checkbox-item:hover, .radio-item:hover {
    background-color: #edf2f7;
    border-color: #cbd5e0;
}

.checkbox-item input[type="checkbox"], .radio-item input[type="radio"] {
    margin-right: 8px;
    accent-color: #3b82f6;
    width: 18px;
    height: 18px;
}

.checkbox-item.selected, .radio-item.selected {
    background-color: #e0f2fe;
    border-color: #90cdf4;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Collapsible section styling */
.collapsible-header {
    cursor: pointer;
    padding: 10px 0;
    font-weight: 600;
    color: #3b82f6;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible-header:hover {
    color: #2563eb;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.open {
    max-height: 1000px; /* Adjust as needed to accommodate content */
    transition: max-height 0.5s ease-in;
    padding-top: 1rem; /* Add padding when open */
    padding-bottom: 1rem;
}

.arrow-icon {
    transition: transform 0.3s ease-in-out;
}

.collapsible-header.open .arrow-icon {
    transform: rotate(90deg);
}

/* Submit button styling */
.submit-button {
    background-color: #3b82f6;
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    display: inline-block;
    width: auto;
    border: none;
}
.submit-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}
.submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}
.submit-button:disabled {
    background-color: #93c5fd; /* blue-300 */
    cursor: not-allowed;
    opacity: 0.7;
}

/* Message box and overlay styling */
.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.message-box.show {
    opacity: 1;
    visibility: visible;
}
.message-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 15px;
}
.message-box p {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 20px;
    text-align: left;
    white-space: pre-wrap; /* Preserve line breaks from JS summary */
    max-height: 300px; /* Limit height for long summaries */
    overflow-y: auto; /* Enable scrolling for long summaries */
    border: 1px solid #eee;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 5px;
}
.message-box button {
    background-color: #3b82f6;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    border: none;
}
.message-box button:hover {
    background-color: #2563eb;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.overlay.show {
    opacity: 1;
    visibility: visible;
}
.conditional-group {
    display: none;
}

/* Media queries for responsiveness */
@media (min-width: 768px) {
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}
