/* ====================== ESTILOS GENERALES ====================== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* ====================== CALENDARIO ====================== */
.calendar-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.calendar-header-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #343a40;
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 5px 0;
    border-radius: 5px 5px 0 0;
    font-size: 0.8rem;
}

.day-header {
    padding: 2px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e9ecef;
    border-radius: 0 0 5px 5px;
}

.calendar-day {
    min-height: 60px;
    background-color: #fff;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: background 0.2s, transform 0.2s;
    color: #212529;
    font-size: 0.75rem;
}

    .calendar-day:hover {
        background-color: #f1f3f5;
        transform: translateY(-1px);
    }

    .calendar-day.today {
        border: 2px solid #007bff;
        background-color: #cce5ff;
    }

    .calendar-day.outside-month {
        background-color: #f8f9fa;
        color: #6c757d;
    }

.day-number {
    font-weight: bold;
    margin-bottom: 3px;
}

button {
    font-size: 0.65rem;
    padding: 1px;
    border-radius: 2px;
    cursor: pointer;
}

    button.btn-primary {
        background-color: #007bff;
        border-color: #007bff;
        color: #fff;
    }

        button.btn-primary:hover {
            background-color: #0056b3;
            border-color: #0056b3;
        }

    button.btn-success {
        background-color: #28a745;
        border-color: #28a745;
        color: #fff;
    }

        button.btn-success:hover {
            background-color: #1e7e34;
            border-color: #1c7430;
        }
.calendar-day .badge {
    font-size: 0.75rem;
    margin-top: 3px;
}

.calendar-day button.badge {
    padding: 0.5em 0;
    font-size: 0.75rem;
    border: none;
}
.day-buttons > * {
    flex: 1 1 auto;
    text-align: center;
}
/* ====================== TOASTS ====================== */
.toast-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.toast-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.toast-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 768px) {
    .calendar-header-grid, .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-day {
        min-height: 50px;
        font-size: 0.65rem;
        padding: 2px;
    }

    .day-number {
        font-size: 0.7rem;
    }

    button {
        font-size: 0.6rem;
        padding: 1px;
    }

    .toast-success, .toast-info, .toast-error {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }


    /* Estilos móviles para intercambio de turnos */
    .mobile-container {
        max-width: 100%;
        padding: 16px;
        margin: 0 auto;
        background: #f5f5f5;
        min-height: 100vh;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        background: white;
        padding: 16px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .step-indicator {
        background: #007bff;
        color: white;
        padding: 4px 12px;
        border-radius: 16px;
        font-size: 12px;
        font-weight: bold;
    }

    .section {
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
    }

        .section-header h5 {
            margin: 0;
            color: #333;
            font-size: 16px;
        }

    .text-muted {
        color: #6c757d;
        font-size: 12px;
    }

    .date-selector {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #f8f9fa;
        padding: 12px;
        border-radius: 8px;
    }

    .current-date {
        font-weight: bold;
        font-size: 16px;
    }

    .btn-outline {
        background: transparent;
        border: 1px solid #007bff;
        color: #007bff;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
    }

    /* Tabs */
    .tabs-container {
        margin: 16px 0;
    }

    .tabs {
        display: flex;
        background: #f8f9fa;
        border-radius: 12px;
        padding: 4px;
    }

    .tab {
        flex: 1;
        padding: 12px 16px;
        border: none;
        background: transparent;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.2s;
        text-align: center;
        cursor: pointer;
    }

        .tab.active {
            background: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            font-weight: bold;
            color: #007bff;
        }

        .tab:not(.active) {
            color: #6c757d;
        }

    /* Lista de turnos */
    .appointment-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .appointment-card {
        border: 2px solid #e9ecef;
        border-radius: 12px;
        padding: 16px;
        transition: all 0.2s;
        background: white;
    }

        .appointment-card.selected {
            border-color: #007bff;
            background: #f8fbff;
        }

        .appointment-card.available {
            border-color: #28a745;
            background: #f8fff9;
        }

    .appointment-time {
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 8px;
        color: #333;
    }

    .patient-info {
        margin-bottom: 8px;
    }

    .patient-contact {
        font-size: 14px;
        color: #666;
    }

    .appointment-status {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 12px;
        margin-bottom: 12px;
    }

        .appointment-status.confirmed {
            background: #d4edda;
            color: #155724;
        }

        .appointment-status.scheduled {
            background: #fff3cd;
            color: #856404;
        }

    .btn-select {
        width: 100%;
        padding: 12px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
        transition: background 0.2s;
    }

        .btn-select:hover {
            background: #0056b3;
        }

    /* Bottom actions */
    .fixed-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 16px;
        border-top: 1px solid #e9ecef;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    }

    .btn-primary {
        width: 100%;
        padding: 16px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: bold;
        font-size: 16px;
        cursor: pointer;
    }

    .btn-secondary {
        padding: 12px 24px;
        background: #6c757d;
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }

    .action-buttons {
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    /* Estados de carga y vacío */
    .loading, .empty-state {
        text-align: center;
        padding: 40px 20px;
        color: #666;
    }

        .empty-state p {
            margin-bottom: 16px;
        }

    /* Pantalla de confirmación */
    .confirmation-summary {
        background: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .exchange-flow, .move-flow {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 20px 0;
    }

    .appointment-box {
        flex: 1;
        text-align: center;
        padding: 16px;
        border: 2px solid #007bff;
        border-radius: 12px;
        background: white;
    }

        .appointment-box.available {
            border-color: #28a745;
        }

    .exchange-arrow, .move-arrow {
        padding: 0 16px;
        font-size: 24px;
        font-weight: bold;
        color: #007bff;
    }

    .patient-name {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 4px;
    }

    .appointment-time {
        font-size: 18px;
        font-weight: bold;
        color: #333;
    }

    .appointment-date {
        font-size: 12px;
        color: #666;
        margin-top: 4px;
    }

    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 4px;
        margin-top: 4px;
        display: inline-block;
    }

        .status-badge.liberado {
            background: #f8d7da;
            color: #721c24;
        }

        .status-badge.nuevo {
            background: #d1ecf1;
            color: #0c5460;
        }

    .explanation {
        background: #f8f9fa;
        padding: 12px;
        border-radius: 8px;
        font-size: 14px;
    }

        .explanation p {
            margin: 4px 0;
        }

    /* Selección de motivo */
    .reason-selection label {
        display: block;
        padding: 12px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: background 0.2s;
    }

        .reason-selection label:hover {
            background: #f8f9fa;
        }

    .reason-selection input[type="radio"] {
        margin-right: 8px;
    }

    .custom-reason {
        margin-top: 12px;
    }

        .custom-reason label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .custom-reason input {
            width: 100%;
            padding: 12px;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            font-size: 14px;
        }

    /* Pantalla de éxito */
    .success-screen {
        text-align: center;
        padding: 60px 20px;
    }

    .success-icon {
        font-size: 48px;
        margin-bottom: 20px;
    }

    .success-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
    }

    .current-selection {
        background: #e7f3ff;
        border: 1px solid #007bff;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .selection-info {
        font-size: 14px;
    }

    .slot-info {
        color: #28a745;
        font-weight: 500;
        margin-bottom: 12px;
    }


} 