/* spa-form.css - Estilo para formularios SPA tipo wizard */

/* Depuración: Si necesitas ver bordes, usa solo en elementos específicos. */
/* .spa-form-container, .spa-form-bg { border: 1px solid red; } */

/* Box sizing global para evitar desbordes */
*, *::before, *::after {
    box-sizing: border-box;
}

.spa-form-bg {
    min-height: 100dvh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: url('https://lemonchiffon-chinchilla-272176.hostingersite.com/wp-content/uploads/2025/09/460df0fa666f09b76c36b43c286dd994a24100b8-scaled.webp') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spa-form-container {
    position: relative;
    background: rgba(30, 20, 10, 0.75);
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 40px 32px;
    max-width: 800px;
    width: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 52px;
}

.spa-form-container h3 {
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
    margin: 0 0 32px 0;
    letter-spacing: 1px;
}
.spa-form-container label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}
.spa-form-container input,
.spa-form-container select,
.spa-form-container textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    border: none;
    margin-bottom: 12px;
    font-size: 1rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
}
.spa-form-container input[type="date"] {
    color-scheme: dark;
}
.spa-form-container input[type="file"] {
    background: none;
    color: #fff;
    border: none;
    margin-bottom: 12px;
}
.spa-form-container button {
    width: auto;
    padding: 14px 32px;
    border-radius: 8px;
    background: none;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.spa-form-container .spa-success {
    background: #d4edda;
    color: #155724;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}
.spa-form-container .spa-error {
    background: #f8d7da;
    color: #721c24;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}
.spa-form-container table {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-bottom: 18px;
    color: #fff;
}
.spa-form-container th, .spa-form-container td {
    padding: 8px;
    text-align: left;
}
.spa-form-container th {
    font-weight: bold;
    background: rgba(255,255,255,0.18);
}
.spa-form-container input[type="radio"],
.spa-form-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: green;
    margin-right: 8px;
    vertical-align: middle;
}
.spa-form-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}
.spa-form-logo img {
    max-width: 180px;
    height: auto;
    content: url('https://lemonchiffon-chinchilla-272176.hostingersite.com/wp-content/uploads/2025/09/82575606c5.png');
}
.spa-nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.spa-nav-btn:hover {
    color: #f5e6d6;
}
.spa-form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    gap: 0;
}
.spa-nav-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}
.spa-nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.spa-nav-left .spa-nav-btn,
.spa-nav-right .spa-nav-btn {
    width: auto;
    min-width: 120px;
    text-align: center;
}
.spa-start-btn {
    background: #fff !important;
    color: #3a2a1a !important;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(31,38,135,0.12);
    padding: 16px 32px;
    transition: background 0.2s, color 0.2s;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.spa-start-btn:hover {
    background: #f5e6d6;
    color: #3a2a1a;
}
.spa-form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Responsive */
@media (max-width: 600px) {
    .spa-form-bg {
        padding: 0;
        min-height: 100vh;
        width: 100vw;
    }
    .spa-form-container {
        max-width: 98vw;
        min-height: 100dvh;
        padding: 52px 52px 0 52px;
        border-radius: 10px;
        gap: 52px;
    }
    .spa-form-logo img {
        max-width: 120px;
    }
    .spa-form-container h3 {
        font-size: 40px;
        font-weight: bold;
        margin-bottom: 44px;
    }
    .spa-form-container label {
        font-size: 1.25rem;
        text-transform: uppercase;
    }
    .spa-form-container input,
    .spa-form-container select,
    .spa-form-container textarea {
        font-size: 0.95rem;
        padding: 10px;
    }
    .spa-form-container button {
        font-size: 1rem;
        padding: 10px;
    }
}
/* Columnas en escritorio */
@media (min-width: 900px) {
    .spa-form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-bottom: 18px;
    }
    .spa-form-container {
        max-width: 800px;
        padding: 48px 40px;
        border-radius: 24px;
        gap: 52px;
        box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.30);
    }
    .spa-form-logo img {
        max-width: 220px;
    }
    .spa-form-container h3 {
        font-size: 2.4rem;
    }
    .spa-form-container label {
        font-size: 1.2rem;
    }
    .spa-form-container input,
    .spa-form-container select,
    .spa-form-container textarea {
        font-size: 1.1rem;
        padding: 16px;
    }
    .spa-form-container button {
        font-size: 1.2rem;
        padding: 16px;
    }
}

/* ===== ESTILOS PARA FORMULARIOS DE SEGUIMIENTO ===== */

/* Búsqueda de clientes */
.spa-search-results {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.spa-client-result {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.spa-client-result strong {
    color: #e8d5b7;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

.spa-client-result small {
    color: #ccc;
    font-size: 0.9rem;
}

.spa-select-client {
    background: linear-gradient(135deg, #d4af37, #f4e08a);
    color: #2c1810;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 8px;
    min-width: 100px;
}

.spa-select-client:hover {
    background: linear-gradient(135deg, #f4e08a, #d4af37);
    transform: translateY(-1px);
}

.spa-client-selected {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: #4caf50;
    font-weight: 600;
    margin-top: 10px;
}

.spa-no-results {
    text-align: center;
    color: #ccc;
    font-style: italic;
    padding: 20px;
}

/* Información del cliente */
.spa-client-info {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #d4af37;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.spa-client-info h4 {
    margin: 0 0 8px 0;
    color: #e8d5b7;
    font-size: 1.2rem;
}

.spa-client-info p {
    margin: 0;
    color: #ccc;
    font-size: 0.95rem;
}

/* Lista de sesiones */
.spa-session-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
}

.spa-session-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.spa-session-item:last-child {
    margin-bottom: 0;
}

.spa-session-item label {
    cursor: pointer;
    display: block;
    margin: 0;
    font-weight: normal;
}

.spa-session-item input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.spa-session-item strong {
    color: #e8d5b7;
    display: block;
    margin-bottom: 4px;
}

/* Tabla de diagnóstico */
.spa-diagnostic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.spa-diagnostic-table th {
    background: rgba(212, 175, 55, 0.8);
    color: #2c1810;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    font-size: 0.85rem;
}

.spa-diagnostic-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    vertical-align: middle;
}

.spa-diagnostic-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: #e8d5b7;
    padding-left: 12px;
}

.spa-diagnostic-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.spa-diagnostic-table input[type="radio"] {
    transform: scale(1.1);
    margin: 0;
}

/* Responsive para formularios de seguimiento */
@media (max-width: 768px) {
    .spa-client-result {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .spa-select-client {
        align-self: stretch;
        margin-top: 10px;
    }
    
    .spa-diagnostic-table {
        font-size: 0.8rem;
    }
    
    .spa-diagnostic-table th,
    .spa-diagnostic-table td {
        padding: 8px 4px;
    }
    
    .spa-diagnostic-table td:first-child {
        padding-left: 8px;
    }
}

@media (min-width: 769px) {
    .spa-search-results {
        max-height: 400px;
    }
    
    .spa-session-list {
        max-height: 300px;
    }
    
    .spa-diagnostic-table {
        font-size: 1rem;
    }
    
    .spa-diagnostic-table th,
    .spa-diagnostic-table td {
        padding: 14px 10px;
    }
}

/* Responsive Diagnostic Container */
.spa-diagnostic-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 32px;
}

.spa-diagnostic-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.spa-condition-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.3;
}

.spa-condition-options {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.spa-radio-option {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.8);
}

.spa-radio-option:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(52, 152, 219, 0.3);
}

.spa-radio-option.needs-improvement {
    background: rgba(241, 196, 15, 0.1);
}

.spa-radio-option.urgent {
    background: rgba(231, 76, 60, 0.1);
}

.spa-radio-option.normal {
    background: rgba(39, 174, 96, 0.1);
}

.spa-radio-option input[type="radio"] {
    margin: 0 0 5px 0;
    transform: scale(1.2);
}

.spa-radio-option span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    color: #2c3e50;
}

.spa-radio-option input[type="radio"]:checked + span {
    color: #2c3e50;
    font-weight: bold;
}

.spa-radio-option.needs-improvement input[type="radio"]:checked {
    accent-color: #f39c12;
}

.spa-radio-option.urgent input[type="radio"]:checked {
    accent-color: #e74c3c;
}

.spa-radio-option.normal input[type="radio"]:checked {
    accent-color: #27ae60;
}

.spa-other-input {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    margin-top: 5px !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit !important;
}

.spa-other-input:focus {
    border-color: #3498db !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3) !important;
}

.spa-other-input::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .spa-diagnostic-item {
        padding: 12px;
    }
    
    .spa-condition-name {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .spa-condition-options {
        gap: 6px;
    }
    
    .spa-radio-option {
        min-width: 70px;
        padding: 8px 6px;
    }
    
    .spa-radio-option span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .spa-diagnostic-container {
        gap: 12px;
    }
    
    .spa-diagnostic-item {
        padding: 10px;
    }
    
    .spa-condition-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .spa-condition-options {
        gap: 4px;
    }
    
    .spa-radio-option {
        min-width: 60px;
        padding: 6px 4px;
    }
    
    .spa-radio-option span {
        font-size: 0.75rem;
    }
    
    .spa-radio-option input[type="radio"] {
        transform: scale(1.1);
    }
}

/* Home Button - Container Positioned */
.spa-home-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.spa-home-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.spa-home-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.spa-home-icon {
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 768px) {
    .spa-home-btn {
        top: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .spa-home-icon {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .spa-home-btn {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .spa-home-icon {
        font-size: 12px;
    }
}

/* Treatment Type Selection Styles */
.spa-treatment-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.spa-treatment-option {
    position: relative;
}

.spa-treatment-option label {
    cursor: pointer;
    margin-bottom: 0;
    width: 100%;
    display: block;
}

.spa-treatment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.spa-treatment-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.spa-treatment-card h4 {
    font-size: 1.3rem;
    margin: 0 0 8px 0;
    color: #fff;
}

.spa-treatment-card p {
    font-size: 1rem;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

.spa-treatment-card small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* New treatment styling */
.spa-treatment-card.new-treatment {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
}

.spa-treatment-card.new-treatment h4 {
    color: #81c784;
}

/* Hover effects */
.spa-treatment-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.spa-treatment-card.new-treatment:hover {
    border-color: rgba(76, 175, 80, 0.7);
    background: rgba(76, 175, 80, 0.2);
}

/* Selected state */
.spa-treatment-option input[type="radio"]:checked + .spa-treatment-card {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.spa-treatment-option input[type="radio"]:checked + .spa-treatment-card.new-treatment {
    border-color: #81c784;
    background: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

/* Responsive treatment options */
@media (max-width: 600px) {
    .spa-treatment-type-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .spa-treatment-card {
        min-height: 120px;
        padding: 16px;
    }
    
    .spa-treatment-card h4 {
        font-size: 1.1rem;
    }
    
    .spa-treatment-card p {
        font-size: 0.9rem;
    }
}
