/**
 * Estilos do Frontend - GTS Serviços
 */

/* Variáveis CSS (definidas inline via PHP) */
/*
:root {
    --gts-primary-color: #0073aa;
    --gts-secondary-color: #00a0d2;
}
*/

.gts-agendamento-form-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    max-width: 800px;
    margin: 30px auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gts-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.gts-form-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.gts-form-header p {
    font-size: 16px;
    color: #666;
}

/* Steps Navigation */
.gts-steps-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.gts-step-indicator {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
    color: #aaa;
    position: relative;
}

.gts-step-indicator.active {
    color: var(--gts-primary-color);
}

.gts-step-indicator.completed {
    color: #4CAF50; /* Green for completed steps */
}

.gts-step-indicator span {
    display: block;
    font-size: 14px;
    margin-top: 5px;
}

.gts-step-indicator::before {
    content: attr(data-step-number);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eee;
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
}

.gts-step-indicator.active::before {
    background: var(--gts-primary-color);
    color: #fff;
}

.gts-step-indicator.completed::before {
    background: #4CAF50;
    color: #fff;
    content: '✔'; /* Checkmark for completed steps */
}

/* Form Steps */
.gts-form-step {
    display: none;
    padding: 20px 0;
}

.gts-form-step.active {
    display: block;
}

.gts-step-content h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.gts-step-content p.description {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
}

/* Item Selection Grid (Services, Employees) */
.gts-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gts-selection-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gts-selection-item:hover {
    border-color: var(--gts-secondary-color);
    box-shadow: 0 0 0 2px var(--gts-secondary-color);
}

.gts-selection-item.gts-selected-item {
    border-color: var(--gts-primary-color);
    box-shadow: 0 0 0 2px var(--gts-primary-color);
    background: #e6f7ff; /* Light blue background for selected */
}

.gts-selection-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #eee;
}

.gts-selection-item h4 {
    margin: 0 0 5px;
    font-size: 18px;
    color: #333;
}

.gts-selection-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.gts-selection-item .gts-item-price {
    font-weight: bold;
    color: var(--gts-primary-color);
    font-size: 16px;
    margin-top: 5px;
}

.gts-selection-item .gts-item-duration {
    font-size: 13px;
    color: #888;
}

/* Dropdowns */
.gts-form-group {
    margin-bottom: 20px;
}

.gts-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.gts-form-group select,
.gts-form-group input[type="text"],
.gts-form-group input[type="email"],
.gts-form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Datepicker */
.gts-datepicker-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

#gts-datepicker {
    display: inline-block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

/* Horarios Slots */
.gts-horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

.gts-horario-slot {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #555;
}

.gts-horario-slot:hover {
    background: #e0e0e0;
}

.gts-horario-slot.selected {
    background-color: var(--gts-primary-color);
    color: #fff;
    border-color: var(--gts-primary-color);
}

.gts-horario-slot.disabled {
    background: #f8f8f8;
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Login/Register Form */
.gts-auth-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
}

.gts-auth-section h4 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.gts-auth-section .gts-button {
    width: 100%;
    margin-top: 10px;
}

/* Checkout Summary */
.gts-checkout-summary {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.gts-checkout-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gts-checkout-summary ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
}

.gts-checkout-summary ul li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 15px;
    color: #555;
}

.gts-checkout-summary ul li:last-child {
    border-bottom: none;
}

.gts-checkout-summary .gts-total-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--gts-primary-color);
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: 15px;
}

/* Points Redemption */
.gts-points-redeem {
    background: #e6f7ff;
    border: 1px solid var(--gts-secondary-color);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gts-points-redeem label {
    font-weight: 600;
    color: #005680;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gts-points-redeem .gts-current-points {
    font-size: 14px;
    color: #005680;
}

/* Mercado Pago */
#gts-mercadopago-container {
    margin-top: 20px;
    text-align: center;
}

/* Buttons */
.gts-form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.gts-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.gts-button-secondary {
    background-color: #f0f0f0;
    color: #555;
}

.gts-button-secondary:hover {
    background-color: #e0e0e0;
}

.gts-button-primary {
    background-color: var(--gts-primary-color);
    color: #fff;
}

.gts-button-primary:hover {
    background-color: var(--gts-secondary-color);
}

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

/* Loading Spinner */
.gts-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.gts-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--gts-primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Messages */
.gts-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 15px;
    text-align: center;
}

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

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

.gts-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* My Appointments &amp; Points */
.gts-my-list-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    max-width: 900px;
    margin: 30px auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.gts-my-list-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.gts-my-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.gts-my-list-table th,
.gts-my-list-table td {
    padding: 12px 15px;
    border: 1px solid #eee;
    text-align: left;
}

.gts-my-list-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.gts-my-list-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.gts-my-list-table .gts-status-badge {
    font-size: 11px;
    padding: 3px 8px;
}

.gts-my-points-card {
    background: linear-gradient(45deg, var(--gts-primary-color), var(--gts-secondary-color));
    color: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin: 30px auto;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gts-my-points-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.gts-my-points-card .points-value {
    font-size: 60px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 15px;
}

.gts-my-points-card .points-equivalent {
    font-size: 18px;
    opacity: 0.9;
}

/* Responsividade */
@media (max-width: 768px) {
    .gts-agendamento-form-wrapper {
        padding: 15px;
        margin: 15px auto;
    }

    .gts-form-header h2 {
        font-size: 24px;
    }

    .gts-selection-grid {
        grid-template-columns: 1fr;
    }

    .gts-horarios-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .gts-form-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .gts-button {
        width: 100%;
    }

    .gts-my-list-table, .gts-my-list-table tbody, .gts-my-list-table tr, .gts-my-list-table td {
        display: block;
    }

    .gts-my-list-table thead {
        display: none;
    }

    .gts-my-list-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 5px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .gts-my-list-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .gts-my-list-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #555;
    }
}

/* ==================== FILTROS DE SERVIÇO ==================== */
.gts-filters-wrapper {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

/* Campo de Pesquisa */
.gts-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.gts-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gts-search-input:focus {
    border-color: var(--gts-primary-color, #0073aa);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.gts-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    opacity: 0.5;
}

/* Filtro de Categorias */
.gts-category-filter-wrapper {
    margin-top: 15px;
}

.gts-filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.gts-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gts-category-chip {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gts-category-chip:hover {
    border-color: var(--gts-primary-color, #0073aa);
    color: var(--gts-primary-color, #0073aa);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gts-category-chip.active {
    background: var(--gts-primary-color, #0073aa);
    border-color: var(--gts-primary-color, #0073aa);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .gts-filters-wrapper {
        padding: 15px;
    }

    .gts-category-chips {
        gap: 8px;
    }

    .gts-category-chip {
        padding: 6px 12px;
        font-size: 13px;
    }

    .gts-search-input {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gts-category-chips {
        gap: 6px;
    }

    .gts-category-chip {
        padding: 5px 10px;
        font-size: 12px;
    }
}
/* ==================== FIM FILTROS ==================== */

/* ==================== NOTIFICAÇÕES TOAST ==================== */
#gts-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.gts-toast {
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gts-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.gts-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.gts-toast-hide {
    opacity: 0;
    transform: translateX(400px);
}

.gts-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.gts-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    word-wrap: break-word;
}

.gts-toast-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.gts-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Tipos de Toast */
.gts-toast-success::before {
    background: #10b981;
}

.gts-toast-success .gts-toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.gts-toast-error::before {
    background: #ef4444;
}

.gts-toast-error .gts-toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.gts-toast-info::before {
    background: #3b82f6;
}

.gts-toast-info .gts-toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.gts-toast-warning::before {
    background: #f59e0b;
}

.gts-toast-warning .gts-toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

/* Animação de swipe */
.gts-toast[style*="transform"] {
    transition: none;
}

/* Responsividade */
@media (max-width: 768px) {
    #gts-toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .gts-toast {
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gts-toast {
        padding: 12px 16px;
        font-size: 13px;
    }

    .gts-toast-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
        margin-right: 10px;
    }

    .gts-toast-message {
        font-size: 13px;
    }
}

/* Animação de pulse para loading */
.gts-toast-info .gts-toast-icon {
    animation: gts-pulse 1.5s ease-in-out infinite;
}

@keyframes gts-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
/* ==================== FIM NOTIFICAÇÕES TOAST ==================== */

/* ==================== OPÇÕES DE PAGAMENTO ==================== */
.gts-payment-options {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gts-payment-options h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
}

.gts-payment-choice {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gts-payment-option {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #fff;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gts-payment-option.selected {
    border-color: var(--gts-primary-color, #0073aa);
    background: #f0f8ff;
}

/* Controles de pagamento customizado */
.gts-custom-payment-controls {
    margin-top: 15px;
    padding: 15px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.gts-custom-payment-controls label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.gts-amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.gts-currency {
    font-weight: 600;
    color: #666;
    font-size: 16px;
}

.gts-custom-amount-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: border-color 0.3s;
}

.gts-custom-amount-input:focus {
    outline: none;
    border-color: var(--gts-primary-color, #2271b1);
}

.gts-payment-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 10px 0;
}

.gts-payment-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gts-primary-color, #2271b1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gts-payment-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gts-primary-color, #2271b1);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gts-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

#gts-slider-value {
    font-weight: 600;
    color: var(--gts-primary-color, #2271b1);
}

.gts-payment-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #e0e0e0;
}

.gts-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.gts-breakdown-item span {
    color: #666;
}

.gts-breakdown-item strong {
    color: #333;
    font-size: 16px;
}

.gts-payment-option:hover {
    border-color: var(--gts-primary-color, #0073aa);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gts-payment-option input[type="radio"] {
    margin-top: 4px;
    margin-right: 12px;
    cursor: pointer;
}

.gts-payment-option input[type="radio"]:checked + .gts-payment-option-content {
    color: var(--gts-primary-color, #0073aa);
}

.gts-payment-option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.gts-payment-option-content strong {
    font-size: 15px;
    display: block;
}

.gts-payment-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--gts-primary-color, #0073aa);
    display: block;
    margin: 4px 0;
}

.gts-payment-option-content small {
    font-size: 13px;
    color: #666;
}

/* ==================== POLÍTICA DE CANCELAMENTO ==================== */
.gts-cancellation-policy {
    margin: 25px 0;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.gts-cancellation-policy h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gts-policy-content {
    color: #856404;
}

.gts-policy-highlight {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
}

.gts-policy-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.gts-policy-text {
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.gts-policy-text p {
    margin: 0 0 10px;
}

.gts-policy-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .gts-payment-options,
    .gts-cancellation-policy {
        padding: 16px;
        margin: 20px 0;
    }

    .gts-payment-option {
        padding: 12px;
    }

    .gts-payment-amount {
        font-size: 16px;
    }

    .gts-policy-highlight {
        flex-direction: column;
        text-align: center;
    }
}
/* ==================== FIM POLÍTICA DE CANCELAMENTO ==================== */