/* ============================================
   MODAL COMPONENT
   ============================================

   Shared modal styles for lead forms and dialogs
   Used across: home, services, premium-services pages
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s, visibility 0.3s;
    outline: none;
}

.modal-overlay[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay[aria-hidden="false"] .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.modal-header .close-btn {
    background: none;
    border: none;
    color: var(--muted);
    transition: color 0.2s;
    padding: 5px;
    cursor: pointer;
}

.modal-header .close-btn:hover {
    color: var(--text);
}

.service-context {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    padding: 10px;
    background: var(--card);
    border-radius: var(--radius-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.service-context-divider {
    color: rgba(26, 67, 191, 0.4);
    font-weight: 600;
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--text);
    /*background: white;*/
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-2);
    box-shadow: 0 0 0 2px rgba(0, 60, 255, 0.2);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Visit Date Field (Showroom) */
.form-group-visit-date {
    animation: fadeIn 0.3s ease-in;
}

.form-group-visit-date input[type="date"] {
    cursor: pointer;
    font-family: inherit;
}

.form-group-visit-date input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.form-group-visit-date input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-label-optional {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.9em;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
    line-height: 1.4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submit-btn {
    width: 100%;
    background: var(--brand-2);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s, opacity 0.2s;
}

.submit-btn:disabled {
    background: var(--brand-blue) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-status {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
}

.form-status.status-success {
    color: #059669; /* green */
}

.form-status.status-error {
    color: #dc2626; /* red */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
