@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/**
 * Estilos públicos do AgendinhaFacil
 */

.agendinhafacil-form {
    max-width: 600px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.agendinhafacil-form h2 {
    text-align: center;
    margin-bottom: 1.5em;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.agendinhafacil-form-group {
    margin-bottom: 1.5em;
    position: relative;
}

.agendinhafacil-form-group label {
    display: block;
    margin-bottom: 0.5em;
    color: #666;
    font-weight: 500;
}

.agendinhafacil-form-group input,
.agendinhafacil-form-group select {
    width: 100%;
    padding: 0.8em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.agendinhafacil-form-group select {
    position: relative;
    z-index: 1000;
    background-color: #fff;
}

.agendinhafacil-form-group input:focus,
.agendinhafacil-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.agendinhafacil-form-group input.error,
.agendinhafacil-form-group select.error {
    border-color: #dc3232;
    background-color: #fff6f6;
}

.agendinhafacil-form-group input:disabled,
.agendinhafacil-form-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.agendinhafacil-form-actions {
    text-align: center;
    margin-top: 2em;
}

.button {
    padding: 0.8em 2em;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-primary {
    background: #0073aa;
    color: #fff;
}

.button-primary:hover:not(:disabled) {
    background: #005177;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.agendinhafacil-message {
    padding: 1em;
    margin-bottom: 1.5em;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    animation: slideIn 0.3s ease;
    display: none;
    position: relative;
    z-index: 999;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agendinhafacil-message.error {
    background: #fbeaea;
    color: #dc3232;
    border: 1px solid #dc3232;
}

.agendinhafacil-loading,
.ui-widget-overlay,
.ui-dialog {
    display: none !important;
}

/* Datepicker customization */
.ui-datepicker {
    padding: 1em;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ui-datepicker .ui-datepicker-header {
    background: #0073aa;
    color: #fff;
    border-radius: 4px 4px 0 0;
    padding: 0.5em;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    color: #fff;
}

.ui-datepicker .ui-datepicker-title {
    text-align: center;
    font-weight: 500;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5em;
}

.ui-datepicker th {
    padding: 0.5em;
    text-align: center;
    font-weight: 500;
    color: #666;
}

.ui-datepicker td {
    padding: 0;
}

.ui-datepicker td a {
    display: block;
    padding: 0.5em;
    text-align: center;
    text-decoration: none;
    color: #333;
}

.ui-datepicker td a:hover {
    background: #f5f5f5;
}

.ui-datepicker td a.ui-state-active {
    background: #0073aa;
    color: #fff;
}

.ui-datepicker td a.ui-state-highlight {
    background: #e6f3fa;
}

/* Estilos para os horários no select */
#appointment_time {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#appointment_time option.available-time {
    color: #28a745 !important;
    background-color: #fff !important;
}

#appointment_time option.booked-time,
#appointment_time option:disabled {
    color: #dc3545 !important;
    background-color: #f8f9fa !important;
    cursor: not-allowed;
}

.schedule-legend {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.schedule-legend p {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-dot.available {
    background-color: #28a745;
}

.legend-dot.booked {
    background-color: #dc3545;
}

/* Garantir que os horários ocupados fiquem vermelhos */
#appointment_time option[disabled] {
    color: #dc3545 !important;
    background-color: #f8f9fa !important;
}

/* Remover qualquer overlay ou popup */
.ui-widget-overlay {
    display: none !important;
}

.ui-dialog {
    display: none !important;
}

/* Responsividade */
@media (max-width: 600px) {
    .agendinhafacil-form {
        margin: 1em;
        padding: 1em;
    }

    .agendinhafacil-form h2 {
        font-size: 20px;
    }

    .agendinhafacil-form-group input,
    .agendinhafacil-form-group select {
        font-size: 14px;
    }

    .button {
        width: 100%;
        margin-bottom: 1em;
    }
}

.agendinhafacil-professionals-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.agendinhafacil-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.agendinhafacil-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5em;
}

.agendinhafacil-card .services {
    margin: 15px 0;
}

.agendinhafacil-card .services ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.agendinhafacil-card .services li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.agendinhafacil-card p {
    margin: 10px 0;
    color: #666;
}

.agendinhafacil-card strong {
    color: #333;
}

.agendinhafacil-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.agendinhafacil-btn:hover {
    background: #005177;
}

.agendinhafacil-error {
    color: #dc3232;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #dc3232;
    border-radius: 4px;
}

.agendinhafacil-success {
    color: #46b450;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #46b450;
    border-radius: 4px;
}

.agendinhafacil-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.agendinhafacil-modal-content {
    position: relative;
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.agendinhafacil-modal h3 {
    margin-top: 0;
    color: #2d3436;
}

.agendinhafacil-modal p {
    margin: 10px 0;
    line-height: 1.5;
}

.agendinhafacil-modal-close {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
}

.agendinhafacil-modal-close:hover {
    background-color: #2980b9;
}

.agendinhafacil-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 1000;
}

.agendinhafacil-loading .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.agendinhafacil-message {
    display: none;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
}

.agendinhafacil-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.agendinhafacil-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.appointment-preview {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.appointment-preview h4 {
    margin: 0 0 15px;
    color: #2c3e50;
    font-size: 1.2em;
}

.appointment-preview p {
    margin: 8px 0;
    color: #495057;
}

.appointment-preview strong {
    color: #2c3e50;
}

.agendinhafacil-summary {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.agendinhafacil-summary h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.agendinhafacil-summary-content {
    margin-bottom: 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #666;
}

.agendinhafacil-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.agendinhafacil-btn-whatsapp {
    background-color: #25D366 !important;
}

.agendinhafacil-btn-whatsapp:hover {
    background-color: #128C7E !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .agendinhafacil-professionals-list {
        grid-template-columns: 1fr;
    }
    
    .agendinhafacil-form {
        margin: 10px;
        padding: 15px;
    }
}

/* Estilização moderna para os botões de navegação do calendário */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    height: 35px;
    width: 35px;
    top: 8px;
    transition: all 0.3s ease;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: absolute;
    text-indent: -9999px;
    overflow: hidden;
}

.ui-datepicker .ui-datepicker-prev {
    left: 5px;
}

.ui-datepicker .ui-datepicker-next {
    right: 5px;
}

/* Criando as setas modernas */
.ui-datepicker .ui-datepicker-prev::after,
.ui-datepicker .ui-datepicker-next::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-width: 2px 2px 0 0;
    top: 50%;
    left: 50%;
    transition: all 0.3s ease;
}

.ui-datepicker .ui-datepicker-prev::after {
    transform: translate(-25%, -50%) rotate(-135deg);
    border-color: #4f46e5;
}

.ui-datepicker .ui-datepicker-next::after {
    transform: translate(-75%, -50%) rotate(45deg);
    border-color: #4f46e5;
}

/* Efeitos de hover */
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: #f8fafc;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ui-datepicker .ui-datepicker-prev:hover::after,
.ui-datepicker .ui-datepicker-next:hover::after {
    border-color: #6366f1;
}

/* Removendo os spans padrão do jQuery UI */
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    display: none;
}

/* Ajuste do header para os novos botões */
.ui-datepicker .ui-datepicker-header {
    background: none;
    border: none;
    padding: 15px 5px 20px 5px;
    position: relative;
}

/* Responsividade para os botões */
@media (max-width: 480px) {
    .ui-datepicker .ui-datepicker-prev,
    .ui-datepicker .ui-datepicker-next {
        height: 30px;
        width: 30px;
    }

    .ui-datepicker .ui-datepicker-prev::after,
    .ui-datepicker .ui-datepicker-next::after {
        width: 8px;
        height: 8px;
        border-width: 1.5px 1.5px 0 0;
    }
}
