/* Email status icons */
.email-status-icon {
    font-size: 1.15em;
    margin-left: 0.4em;
    vertical-align: middle;
    font-weight: 900;
    user-select: none;
}
.email-status-success {
    color: #1b5e20; /* matte forest green */
    text-shadow: 0 1px 0 #0d2c13;
}
.email-status-fail {
    color: #cc2321; /* Ruby red */
    text-shadow: 0 1px 0 #7b1010;
}
/* Chadzor Orange Accent */
.chadzor-orange {
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}
/* Purge Message Styles */
.purge-message {
    margin: 1.5rem auto 2rem auto;
    max-width: 600px;
    padding: 1.1rem 2rem;
    background: #fff3ef;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 12px rgba(224, 78, 57, 0.07);
    letter-spacing: 0.02em;
}
/* Purge Button Styles */
.purge-btn {
    display: block;
    margin: 0 auto 2rem auto;
    padding: 1rem 2.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary);
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(224, 78, 57, 0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.purge-btn:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 18px rgba(224, 78, 57, 0.18);
    transform: translateY(-2px) scale(1.03);
}
/* --- Portal Hero Title Styles (Navbar Match) --- */
.portal-hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.01em;
}
.portal-hello {
    font-size: 2.2rem;
    font-weight: 300;
    color: #111;
    font-family: 'Inter', 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
    text-transform: none;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}
.portal-citizen {
    font-size: 2.1rem;
    font-weight: 300;
    color: #111;
    font-family: 'Inter', 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}
.portal-id {
    font-size: 1.3rem;
    font-weight: 300;
    color: #111;
    font-family: 'Inter', 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
    letter-spacing: -0.01em;
    display: inline-block;
}
/* --- End Portal Hero Title Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --color-primary: #e04e39;
    --color-primary-dark: #c43e2c;
    --color-primary-light: #f05a47;
    --color-secondary: #fdf9f6;
    --color-dark: #1a1a1a;
    --color-dark-2: #2b2b2b;
    --color-text: #3a3a3a;
    --color-text-light: #6b6b6b;
    --color-border: #e5e5e5;
    --color-bg: #ffffff;
    --color-bg-alt: #f9f9f9;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

.btn-link {
    color: var(--color-primary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-transform: none;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(224, 78, 57, 0.2);
    outline: none;
}

.content {
    padding-top: 0;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h1:focus {
    outline: none;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(224, 78, 57, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 2rem;
}

.card-body pre {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-danger {
    background-color: #fff5f5;
    border-color: #fed7d7;
    color: #c53030;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 2px solid #48bb78;
    outline-offset: 2px;
}

.invalid {
    outline: 2px solid #f56565;
    outline-offset: 2px;
}

.validation-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.blazor-error-boundary {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Leaflet map marker pulse animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(78, 205, 196, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0);
    }
}

@keyframes pulse-current {
    0% {
        box-shadow: 0 0 0 0 rgba(224, 78, 57, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(224, 78, 57, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(224, 78, 57, 0);
    }
}

.pulse-visitor {
    animation: pulse 2s infinite;
}

.pulse-current {
    animation: pulse-current 2s infinite;
}

/* Add extra space above geolocation/browser info card */
.combined-info-card {
  margin-top: 2.31rem !important; /* 2rem + 0.05in (5px) */
}

/* ========================================
   Mobile & iOS Safari Fixes
   ======================================== */
@media only screen and (max-width: 768px) {
    /* Prevent horizontal overflow */
    * {
        max-width: 100vw;
    }
    
    html, body {
        overflow-x: hidden !important;
        -webkit-text-size-adjust: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Fix all images */
    img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
        object-fit: contain !important;
        display: block;
    }
    
    /* QR code specific */
    .qr-code-image,
    .qr-display-box,
    .qr-display-box img {
        max-width: 280px !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    
    /* Product images */
    .product-image,
    .product-card img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Fix all containers */
    .container,
    .content-wrapper,
    .qr-card,
    .product-card,
    .card,
    .info-card,
    .detail-row {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.75rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Fix page wrapper */
    .qr-public-page,
    .page-container {
        padding: 0.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix text wrapping */
    .detail-value,
    .redirect-link,
    span,
    p,
    div {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
    }
    
    /* Reduce font sizes */
    .portal-hello {
        font-size: 1.3rem !important;
    }
    
    .portal-citizen {
        font-size: 1.2rem !important;
    }
    
    .portal-id {
        font-size: 0.9rem !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    /* Fix buttons */
    button,
    .btn,
    .pay-button,
    .btn-copy,
    .btn-download {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
        margin: 0.5rem 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Fix input fields */
    input,
    input[type="text"],
    input[type="email"],
    input[type="url"],
    textarea,
    select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
        padding: 0.75rem !important;
    }
    
    /* Fix action buttons container */
    .action-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    /* Fix hero banner */
    .hero-banner,
    .hero-content {
        padding: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Additional iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific */
    img {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
    
    input,
    textarea {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }
}

/* QRBook Feature Styles - Glass Morphism */
.qrbook-section {
    background: rgba(255, 249, 240, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem 1.5rem;
    margin: 2rem 0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(224, 78, 57, 0.1);
    border: 1px solid rgba(224, 78, 57, 0.15);
}

.qrbook-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.qrbook-badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.qrbook-subtitle {
    text-align: center;
    color: #5a6c7d;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.qrbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.qrbook-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(224, 78, 57, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(224, 78, 57, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.qrbook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, #ff6b35 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.qrbook-card:hover::before {
    transform: scaleX(1);
}

.qrbook-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(224, 78, 57, 0.15);
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.9);
}

.qrbook-qr {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(224, 78, 57, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qrbook-company {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
}

.qrbook-event,
.qrbook-location {
    color: #5a6c7d;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    text-align: center;
    font-weight: 500;
}

.qrbook-label {
    color: var(--color-primary);
    font-weight: 600;
    margin-right: 0.25rem;
}

.qrbook-description {
    color: #34495e;
    line-height: 1.6;
    margin: 1rem 0;
    font-size: 0.88rem;
    text-align: center;
    font-weight: 400;
}

.qrbook-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #ff6b35 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(224, 78, 57, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.qrbook-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 78, 57, 0.4);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    width: 20px !important;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
}

.qrbook-fields {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    margin-bottom: 1.5rem;
}

.qrbook-fields h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.char-count.limit-near {
    color: #fd7e14;
    font-weight: 600;
}

.char-count.limit-reached {
    color: #dc3545;
    font-weight: 700;
}

/* Mobile responsive adjustments for QRBook */
@media (max-width: 768px) {
    .qrbook-section {
        padding: 2rem 1rem !important;
    }
    
    .qrbook-section h2 {
        font-size: 1.6rem !important;
    }
    
    .qrbook-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .qrbook-card {
        padding: 1.25rem !important;
    }
    
    .checkbox-label {
        padding: 0.75rem !important;
    }
    
    .qrbook-fields {
        padding: 1rem !important;
    }
}