/* Reset basic spacing and use a standard system font */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 15px;
    background-color: #f4f6f8;
    color: #333333;
}

/* Style the top header layout */
header {
    text-align: center;
    background-color: #005A9C; /* Clean civic blue */
    color: white;
    padding: 20px 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

header h1 {
    margin: 0 0 5px 0;
    font-size: 24px;
}

header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.site-nav {
    margin-top: 10px;
}

.site-nav a {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.site-nav a:hover {
    background: rgba(255,255,255,0.28);
}

.flag-badge {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 6px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
}

/* Style the text underneath the header */
main > p {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.trust-note {
    background-color: #eef6ff;
    border: 1px solid #cfe0ee;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.trust-note p {
    margin: 0;
    font-size: 12.5px;
    color: #34495e;
    line-height: 1.5;
}

/* Standard vertical card layout for the submission form */
form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column; /* Force elements to stack cleanly vertically */
    gap: 15px; /* Adds consistent spacing between form pieces */
}

form h3 {
    margin: 0 0 5px 0;
    color: #005A9C;
    font-size: 18px;
}

label {
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

/* Style input fields, dropdowns, and text boxes */
select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box; /* fixed: was "border-radius", an invalid value that got ignored */
    background-color: #fafafa;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Style the action submission button */
button {
    background-color: #2e7d32; /* Green for execution/action */
    color: white;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #1b5e20;
}

/* ------------------------------------------------------------------ */
/* Nearby / duplicate-check panel                                      */
/* ------------------------------------------------------------------ */
.nearby-panel {
    border: 1px solid #e0e4e8;
    background-color: #fafbfc;
    border-radius: 10px;
    padding: 14px;
}

.nearby-status {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 0 0 8px 0;
}

.nearby-status-found {
    color: #b45309; /* amber — heads up, review these */
}

.nearby-status-clear {
    color: #2e7d32; /* green — clear to submit */
}

.nearby-status-warn {
    color: #c62828; /* red — couldn't check */
}

.nearby-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nearby-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 10px 12px;
}

.nearby-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nearby-item-desc {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nearby-item-meta {
    font-size: 11px;
    color: #888;
}

.upvote-btn {
    flex-shrink: 0;
    background-color: #005A9C;
    color: white;
    border: none;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0;
}

.upvote-btn:hover {
    background-color: #00457a;
}

.upvote-btn:disabled {
    background-color: #9aa5ad;
    cursor: default;
}

.nearby-hint {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.location-status {
    font-size: 13px;
    color: #555;
    font-style: italic;
    margin-top: -5px;
}

/* ------------------------------------------------------------------ */
/* Photo capture                                                       */
/* ------------------------------------------------------------------ */
#photoInput {
    width: 100%;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    font-size: 13px;
    background-color: #fafafa;
    box-sizing: border-box;
}

.photo-preview-wrap {
    position: relative;
    max-width: 220px;
}

.photo-preview-wrap img {
    width: 100%;
    border-radius: 8px;
    display: block;
    border: 1px solid #e0e4e8;
}

#removePhotoBtn {
    margin-top: 6px;
    background: none;
    border: none;
    color: #c62828;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.photo-hint {
    margin: -8px 0 0 0;
    font-size: 11px;
    color: #888;
    font-style: italic;
}

.site-footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 20px 0 10px 0;
}

.site-footer a {
    color: #005A9C;
}

/* ------------------------------------------------------------------ */
/* Post-submission share panel                                         */
/* ------------------------------------------------------------------ */
.share-success-panel {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.share-success-panel p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #2e7d32;
    font-weight: 600;
}

.share-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-actions button {
    margin-top: 0;
    padding: 10px 14px;
    font-size: 13px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    color: white;
}

#shareWhatsappBtn {
    background-color: #25D366;
}

#shareWhatsappBtn:hover {
    background-color: #1ebc59;
}

#copyLinkBtn {
    background-color: #005A9C;
}

#copyLinkBtn:hover {
    background-color: #00457a;
}
