/* ============================================
   MADx Hub — Service Requests Styles
   v5.0 - Unified black/red/white theme
   ============================================ */

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

#service-requests-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    justify-content: flex-end;
    align-items: flex-start;
    pointer-events: none;
}

.sr-modal {
    background: #0a0a1a;
    border: 1px solid #333;
    border-top: 2px solid #e63946;
    color: #e0e0e0;
    width: 400px;
    max-height: 90vh;
    margin: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: all;
}

/* ========== HEADER ========== */

.sr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #222;
}

.sr-header h2 {
    margin: 0;
    font-size: 1.1em;
    color: #fff;
}

.sr-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.sr-close-btn:hover {
    color: #e63946;
}

/* ========== FORM BODY ========== */

.sr-form-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.sr-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sr-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sr-section-label {
    font-size: 0.75em;
    font-weight: 700;
    color: #e63946;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
}

.sr-select,
.sr-input,
.sr-textarea {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    color: #e0e0e0;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s;
}

.sr-select:focus,
.sr-input:focus,
.sr-textarea:focus {
    border-color: #e63946;
}

.sr-textarea {
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
}

/* Address row — two fields side by side */
.sr-row {
    display: flex;
    gap: 10px;
}

.sr-row .sr-field {
    flex: 1;
}

.sr-row .sr-field-small {
    flex: 0 0 100px;
}

.sr-shout-wrapper {
    position: relative;
}

.sr-shout-count {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.75em;
    color: #666;
}

/* ========== SUBMIT BUTTON ========== */

.sr-submit-btn {
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin: 4px 20px 12px 20px;
}

.sr-submit-btn:hover:not(:disabled) {
    background: #d32f3f;
    transform: scale(1.02);
}

.sr-submit-btn:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
}

/* ========== STATUS MESSAGE ========== */

.sr-status-msg {
    font-size: 0.85em;
    text-align: center;
    padding: 0 20px 12px 20px;
    min-height: 1.2em;
    color: #e63946;
}

/* ========== MAP PIN PULSE ========== */

.service-request-pulse {
    animation: sr-pulse-ring 2s ease-out infinite;
}

@keyframes sr-pulse-ring {
    0% { stroke-opacity: 0.8; }
    50% { stroke-opacity: 0.2; }
    100% { stroke-opacity: 0.8; }
}

/* ========== DRAWER BUTTON BADGE ========== */

.sr-badge {
    display: none;
    background: #e63946;
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .sr-modal {
        width: calc(100% - 32px);
        max-height: 85vh;
    }

    .sr-row {
        flex-direction: column;
        gap: 12px;
    }

    .sr-row .sr-field-small {
        flex: 1;
    }
}