/* CSS Específico: Medios de Pago Internacionales
   Adaptado para calculaincoterms.es 
*/

:root {
    --primary-blue: #007bff;
    --dark-blue: #0056b3;
    --light-bg: #f4f7fc;
    --white: #ffffff;
    --text-main: #333;
    --text-muted: #666;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
}

/* Scroll */
::-webkit-scrollbar {
    width: 10px; /* o el tamaño que prefieras */
}

::-webkit-scrollbar-thumb {
    background-color: #056bd8; /* Color del "dedo" del scrollbar */
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background: #fff; /* Color del fondo del track */
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
}

.container2 {
    width: 95%;
    max-width: 1100px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin: 40px auto;
}

/* Header Estilo CalculaIncoterms */
header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    padding: 15px 30px 30px 20px;
    border-radius: 12px;
    color: white;
    margin-bottom: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Bloques de Contenido */
section {
    margin-bottom: 50px;
}

h2 {
    color: var(--dark-blue);
    border-left: 5px solid var(--primary-blue);
    padding-left: 15px;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

/* Caja de Definición (El "Por qué") */
.info-box {
    background-color: #f8fbff;
    border: 1px dashed var(--primary-blue);
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Estilo para los enlaces dentro de la tabla */
.risk-table td a {
    text-decoration: none; /* Quita el subrayado */
    color: black;
    transition: color 0.01s ease; /* Para que el cambio al pasar el ratón sea suave */
}

/* Efecto al pasar el ratón (opcional pero recomendado) */
.risk-table td a:hover {
    color: var(--dark-blue); /* Se vuelve un poco más claro al señalarlo */
    text-decoration: underline; /* El subrayado solo aparece al poner el ratón encima */
}

/* Tabla de Riesgos Responsive */
.risk-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

.risk-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.risk-table th {
    background-color: #f8f9fa;
    color: var(--dark-blue);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.risk-table td {
    padding: 15px;
    border-top: 1px solid #eee;
}

/* Badges de Riesgo */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
}

.badge-safe { background: #e8f5e9; color: var(--success); }
.badge-warn { background: #fff3e0; color: #e67e22; }
.badge-danger { background: #ffebee; color: var(--danger); }

/* --- CONTENEDOR INTERACTIVO (HOTSPOTS) --- */
.interactive-doc {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 30px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.interactive-doc img {
    width: 100%;
    display: block;
    height: auto;
}

.hotspot {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3);
    transition: transform 0.3s;
}

.hotspot:hover {
    transform: scale(1.2);
    background-color: var(--dark-blue);
}

/* Tooltips básicos (Se pueden mejorar con JS) */
.hotspot:hover::after {
    content: attr(data-info);
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 200px;
    font-size: 0.9rem;
    z-index: 10;
    line-height: 1.3;
}

.hotspot.active::after, 
.hotspot.active::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Botones y Navegación */
.tool-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
}

.tool-nav a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 15px;
    border: 1px solid var(--primary-blue);
    border-radius: 5px;
    transition: 0.3s;
}

.tool-nav a:hover {
    background-color: var(--primary-blue);
    color: white;
}

@media (max-width: 768px) {
    .container2 { padding: 20px; }
    header h1 { font-size: 1.8rem; }
}

/* Políticas */
.footer-legal {
    background-color: transparent;
    text-align: center;
    padding: 15px;
    z-index: 10;
}

.footer-legal a, #cookie-settings-btn {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin: 0 5px;
}

.footer-legal a:hover, #cookie-settings-btn:hover {
    text-decoration: underline;
}

/* Modal general */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

/* Contenido del modal */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.modal-text {
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Botón cerrar */
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.modal-text h2,
.modal-text h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #222;
}

.modal-text p {
    margin-bottom: 1em;
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

.modal-text ul {
    margin: 0 0 1.5em 1.5em;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
}

.modal-text ul li {
    margin-bottom: 0.5em;
}

#cookie-banner {
    display: none;
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    max-width: 520px;
    width: 90%;
    z-index: 10000;
    font-size: 14px;
    color: #333;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#cookie-banner .cookie-text {
    flex: 1 1 60%;
    min-width: 220px;
}

#cookie-banner .cookie-text p {
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.cookie-buttons {
    flex: 0 1 auto;
    display: flex;
    gap: 10px;
}

#cookie-banner button {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

#accept-cookies {
    background-color: #007bff;
    color: white;
}

#accept-cookies:hover {
    background-color: #0056b3;
}

#reject-cookies {
    background-color: #f0f0f0;
    color: #333;
}

#reject-cookies:hover {
    background-color: #dcdcdc;
}

#modal-preferencias .modal-text label {
    display: block;
    margin: 12px 0 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    color: #222;
}

#modal-preferencias .modal-text input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.botones {
    display: flex;
    justify-content: center;
}

#modal-preferencias button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

#modal-preferencias button:first-of-type {
    background-color: #007bff;
    color: white;
}

#modal-preferencias button:first-of-type:hover {
    background-color: #0056b3;
}

#modal-preferencias button:last-of-type {
    background-color: #444;
    margin-left: 10px;
}

#modal-preferencias button:last-of-type:hover {
    background-color: #aaa;
}