/* ==============================================================
   SRP GLOBAL STYLES - UNIFIED STYLES
============================================================== */

:root {
    /* Brand Colors */
    --srp-btn: #c59246;
    --srp-btn-hover: #8b5a21;
    --srp-light-brown: rgba(180, 127, 47, 0.562);
    --srp-dark-brown: rgba(126, 75, 41, 0.0);
    
    /* Elements Colors */
    --bg-light: rgba(255, 255, 255, 0.9);
    --header-bg-color: rgba(180, 127, 47,1.0);
    --text-tile: #684608;
    --text-main: #684608;
    --text-muted: #555;
    --text-light: #666;
    --border-light: #eee;
    --border-input: #ccc;
    --border-form: #b69a75;
    --border-btn: rgb(104, 72, 25);
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.15);
    --secondary-button: rgb(238, 199, 141);
    --secondary-button-hover: rgb(173, 138, 84);
    --logo-text-color: #C38B50;
    --srp-inactive: rgb(250, 6, 6);
    --srp-suspended: rgb(235, 175, 11);
    --srp-active: rgb(76, 175, 80);
    --srp-hamburger: rgb(46, 32, 11);
    
    /* Typography */
    --font-heading: Verdana, sans-serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: monospace;
    --font-title: 'Gasoek One', sans-serif;
}

/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

.page-section { min-height: auto; }

/* --- Welcome Page Styles --- */
.page-section {
    color: var(--text-tile);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.page-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.page-section p {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 30px;
    color: var(--text-main);
}

.btn-start {
    background-color: var(--srp-btn);
    color: var(--text-main);
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-start:hover { 
    background-color: var(--srp-btn-hover); 
    transform: translateY(-2px);
}

.time-est { 
    font-size: 0.85rem; 
    color: var(--text-main); 
}

.gasoek-one {
    font-size: 150px;
    font-family: var(--font-title) !important;
    font-weight: 80 !important;
}

/* --- Form Container Styles --- */
.form-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

/* .form-container aesthetics */
.form-container {
    background-color: var(--bg-light);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--border-form);
    box-shadow: 0px 10px 30px var(--shadow-dark);
    margin: 0 auto;
}

/* Form Grid Layout & Labels */
.form-group, .srp-input-group { 
    margin-bottom: 25px; 
}

.form-group label, .srp-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.row {
    display: grid;
    gap: 15px;
}
.row-2 { grid-template-columns: repeat(2, 1fr); }
.row-3 { grid-template-columns: repeat(3, 1fr); }

.incident-location-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.incident-location-split > * {
    width: auto;
    max-width: none;
}

.incident-location-split input[type="text"] {
    width: 100%;
    min-width: 0;
}

.incident-street-input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
}

/* Navigation Buttons */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.btn-primary, .btn-secondary, .link-next, .srp-form-actions input[type="submit"] {
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary, .link-next, .srp-form-actions input[type="submit"] {
    background-color: var(--srp-btn);
    color: var(--bg-light);
    flex-grow: 1;
    width: 70%;
    display: block;
}

.btn-primary:hover, .link-next:hover, .srp-form-actions input[type="submit"]:hover { 
    background-color: var(--srp-btn-hover); 
    transform: translateY(-2px);
    box-shadow: 0px 5px 15px rgba(var(--srp-btn-hover), 0.4);
}

input[type="text"],
input[list],
input[type="email"],
select, 
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-input);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-light);
    transition: all 0.3s ease;
}

.incident-area-avatar-wrap {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid #dcc59f;
    border-radius: 12px;
    background: #fff9ef;
}

.incident-area-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #b6894b;
    background:
        radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.85) 0 8%, transparent 9%),
        linear-gradient(135deg, #c5e5c2 0%, #c5e5c2 28%, #b8d9ff 28%, #b8d9ff 46%, #d7e8bf 46%, #d7e8bf 70%, #f4d39a 70%, #f4d39a 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.incident-area-avatar::after {
    content: "";
    position: relative;
    left: 24px;
    top: 20px;
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: #dd3b3b;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9) inset;
}

.incident-area-avatar.is-pending {
    filter: grayscale(1);
    opacity: 0.72;
}

.incident-area-avatar.is-saved {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.04);
}

.incident-area-avatar-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.incident-area-avatar-meta strong {
    font-size: 0.95rem;
    color: #684608;
}

.incident-area-avatar-meta span {
    font-size: 0.86rem;
    color: #7d6440;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .incident-area-avatar-wrap {
        align-items: flex-start;
    }
}

/* The base class for the spinner */
.spinner {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 3px solid rgba(var(--border-btn), 0.596) !important;
    border-radius: 50% !important;
    border-top-color: var(--srp-btn) !important; /* Matches WordPress blue */
    animation: spin 1s ease-in-out infinite !important;
}


.hidden {
    display: none !important;
}

/* The animation keyframes */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.srp-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    border-radius: 4px;
    box-shadow: 0 2px 10px var(--shadow-light);
    overflow: hidden;
    margin: 0px auto;
    width: 100%;
    max-width: 1400px;
}

.srp-header {
    background-color: var(--header-bg-color);
    color: var(--bg-light);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.srp-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--bg-light) !important;
}

/* Buttons */
.srp-header-actions .btn {
    background: var(--bg-light);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.srp-header-actions .btn i {
    margin-right: 5px;
}

.srp-header-actions .btn:hover {
    background: var(--shadow-light);
}

/* Table Styling */
.srp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* Ensures columns adjust based on content */
}

.srp-table th, 
.srp-table td {
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
}

.srp-table th {
    font-weight: bold;
    color: var(--text-main);
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Footer & Pagination */
.srp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    color: var(--text-muted);
}

.srp-pagination a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 3px;
}

.srp-pagination a:hover {
    background: var(--shadow-light);
}

.srp-pagination a.active {
    background: var(--srp-btn);
    color: var(--bg-light);
}

/* Buttons */
.srp-header-actions .btn {
    background: var(--bg-light);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.srp-header-actions .btn i {
    margin-right: 5px;
}

.srp-header-actions .btn:hover {
    background: var(--shadow-light);
}
/* Action Icons */
/* Keeps the cell acting like a proper table cell */
.action-cells {
    font-size: 20px;
    vertical-align: middle; /* Optional: centers icons vertically with other columns */
}

/* Handles the spacing of the icons safely */
.action-flex-container {
    display: flex;
    gap: 15px;
}

.action-icon {
    text-decoration: none;
    /* Removed margin-right: 10px; since 'gap: 15px' handles spacing perfectly now */
}
.action-icon.edit { color: var(--header-bg-color); }
.action-icon.delete { color: var(--srp-btn); }

/* Footer & Pagination */

/* ==========================================
   MODAL STYLING (Copied for Registration)
   ========================================== */

/* The dark background overlay */
.srp-modal-overlay {
    /* display: none; is now handled inline, but we keep the rest */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    
    /* These two lines are what center the modal! */
    justify-content: center;
    align-items: center;
}

/* The white modal box */
.srp-modal-content {
    background-color: var(--bg-light);
    width: 100%;
    max-width: 600px; /* Overridden to 400px inline for the avatar modal */
    margin: auto;
    max-height: calc(100vh - 48px);
    border-radius: 6px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: srpModalFadeIn 0.3s ease;
}

@keyframes srpModalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Header */
.srp-modal-header {
    background-color: var(--header-bg-color);
    color: var(--bg-light);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.srp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--bg-light);
}

.srp-modal-close {
    background: none;
    border: none;
    color: var(--bg-light);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
}

.srp-modal-close:hover {
    opacity: 1;
}

/* Modal Body & Footer */
.srp-modal-body {
    padding: 20px;
}

.srp-modal-footer {
    padding: 15px 20px;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.srp-btn-cancel, .srp-btn-save {
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.srp-btn-cancel {
    background-color: var(--border-light);
    color: var(--text-main);
}

.srp-btn-save {
    background-color: var(--srp-btn);
    color: var(--bg-light);
}