/**
 * Header CTAs & Cita Online Modal Styles
 * @package CambraStarter
 */

/* ─────────────────────────────────────────
   Header CTAs Container
   ───────────────────────────────────────── */
.header-ctas {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Alta Gratuita button (existing style, adjust if needed) */
.cb-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--color-primary, #a31515);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cb-nav-cta:hover {
    background: var(--color-primary-dark, #831212);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 21, 21, 0.3);
}

.cb-nav-cta:active {
    transform: translateY(0);
}

/* Cita Online button - simple style, no background */
.cb-cita-online-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    background: transparent;
    color: var(--color-primary, #a31515);
    font-weight: 500;
    font-size: 13px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.cb-cita-online-btn:hover {
    color: var(--color-primary-dark, #831212);
    background: rgba(163, 21, 21, 0.08);
    border-color: rgba(163, 21, 21, 0.2);
    transform: translateY(-1px);
}

.cb-cita-online-btn:active {
    transform: translateY(0);
}

.cita-icon {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cita-text {
    display: inline;
}

/* Hide text on small screens */
@media (max-width: 639px) {
    .cita-text {
        display: none;
    }
    
    .cita-icon {
        width: 18px;
        height: 18px;
    }
}

/* ─────────────────────────────────────────
   Modal Styles
   ───────────────────────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary, #a31515);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #1f2937;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        height: 90vh;
    }

    .modal-body {
        padding: 0;
    }

    .modal-header {
        padding: 14px 16px;
        flex-shrink: 0;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-close-btn {
        font-size: 20px;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .modal-content {
        width: 90%;
        max-width: 90%;
        height: 80vh;
    }

    .modal-body {
        padding: 0;
    }
}

/* Accessibility: Focus states */
.modal-close-btn:focus,
.cb-cita-online-btn:focus,
.cb-nav-cta:focus {
    outline: 2px solid var(--color-primary, #a31515);
    outline-offset: 2px;
}

/* Prevent scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* iframe responsivo dentro del modal */
#cita-online-iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
