:root {
    --primary: #9e1b32;
    --primary-hover: #9e1b32;
    --primary-glow: rgba(2, 132, 199, 0.15);
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --card-border: #e0e0e0;
    --text-main: #334155;
    --text-muted: black;
    --input-border: #cbd5e1;
    --input-focus: #0284c7;
    --success: #10b981;
    --error: #ef4444;
    --footer-bg: #5f6a72;
    --footer-text: #eeeeee;
    --font-sans: 'Open Sans', sans-serif;
    --transition: all 0.2s ease-in-out;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Style (inspired by mat-toolbar) */
.navbar {
    background-color: #9e1b32; /* Navy background to make white logo visible */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-container {
    width: 100%;
    max-width: 1200px;
    /*margin: 0 auto;*/
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.brand-logo-img {
    height: auto;
    width: 125px;
    display: block;
    margin-left: 20px;
}

/* Container & Main layout */
.container {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1140px;
    margin: 40px auto 60px auto;
    padding: 0 20px;
}

.card-container {
    /*background: var(--card-bg);*/
    /*border: 0px solid var(--card-border);*/
    /*border-radius: 8px;*/
    /*padding: 2.5rem;*/
    /*box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);*/
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Headers */
.card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1.25rem;
}

.titulo-sub-bloque {
    font-size: 25.5px;
    font-weight: 700;
    color: var(--text-muted);
    font: var(--font-sans);
}

.subtitulo {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #64748b;
}

.info-text-bottom {
    font-size: 12.8px;
}

/* Form Styles */
.verification-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 16px;
    font-weight: 500;
    color: #ae0000;
}

.input-wrapper {
    position: relative;
}

#certificateCode, #countrySelect {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

#countrySelect {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px; /* Space for custom arrow */
}

#certificateCode:focus, #countrySelect:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

#certificateCode.input-error {
    border-color: var(--error);
    background-color: #fef2f2;
}

.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

#countrySelect:focus + .select-arrow {
    border-top-color: var(--input-focus);
    transform: translateY(-50%) rotate(180deg);
}

.error-message {
    font-size: 0.85rem;
    color: var(--error);
    display: none;
    margin-top: 4px;
}

/* Buttons (inspired by mat-button) */
.buttons-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-consultar {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 28px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-consultar:hover {
    background-color: var(--primary-hover);
}

.btn-consultar:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status Feedback Block */
.status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.status-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.status-icon {
    width: 24px;
    height: 24px;
}

.status-container.success {
    border-left: 4px solid var(--success);
}
.status-container.success .status-icon-wrapper {
    background-color: #d1fae5;
    color: var(--success);
}

.status-container.failure {
    border-left: 4px solid var(--error);
}
.status-container.failure .status-icon-wrapper {
    background-color: #fee2e2;
    color: var(--error);
}

.status-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.status-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--input-border);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Footer Style */
.footer {
    width: 100%;
    height: 200px;
    vertical-align: middle;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    font-size: 0.85rem;
    padding: 20px 24px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-row {
    display: flex;
    margin-top: 20px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.secured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a7f3d0;
}

.hidden {
    display: none !important;
}

/* Responsive adjustment */
@media (max-width: 600px) {
    .container {
        margin: 20px auto;
    }
    .card-container {
        padding: 1.5rem;
    }
    .footer-row {
        flex-direction: column;
        text-align: center;
    }
}
