/* ==================== GENERAL STYLES ==================== */

.htt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.htt-overlay-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.htt-overlay-content h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.htt-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.htt-close-btn:hover {
    color: #333;
}

#htt-session-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.htt-session-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.htt-session-option:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-2px);
}

.htt-session-option .duration {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.htt-session-option .price {
    font-size: 20px;
    font-weight: 700;
    color: #2196F3;
}

.htt-cancel-btn {
    width: 100%;
    padding: 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.htt-cancel-btn:hover {
    background: #d32f2f;
}

/* ==================== FLOATING CHAT BUTTON ==================== */

.htt-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.htt-floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.htt-btn-icon {
    font-size: 24px;
}

/* ==================== CHAT BOX ==================== */

.htt-chatbox {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 400px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.htt-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.htt-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.htt-status-dot {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.htt-status-dot.htt-active {
    background: #4caf50;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.htt-header-title {
    font-size: 18px;
    font-weight: 600;
}

.htt-header-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.htt-header-actions button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.htt-header-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.htt-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.htt-message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.htt-message-own {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.htt-message-other {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.htt-message-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.8;
}

.htt-message-text {
    font-size: 14px;
    line-height: 1.4;
}

.htt-chat-input-area {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    gap: 10px;
}

#htt-chat-input,
#htt-therapist-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

#htt-chat-input:focus,
#htt-therapist-input:focus {
    border-color: #667eea;
}

.htt-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.htt-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ==================== THERAPIST DASHBOARD ==================== */

.htt-therapist-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.htt-dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.htt-dashboard-header h1 {
    margin: 0 0 10px 0;
    color: #333;
}

.htt-dashboard-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.htt-sessions-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.htt-sessions-container h2 {
    margin: 0 0 20px 0;
    color: #333;
}

.htt-no-sessions {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.htt-no-sessions p {
    margin: 10px 0;
    font-size: 16px;
}

.htt-help-text {
    font-size: 14px !important;
    color: #bbb !important;
}

.htt-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.htt-session-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.htt-session-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.htt-session-card.claimed {
    opacity: 0.6;
}

.htt-session-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.htt-session-info .duration {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.htt-session-info .time-left {
    margin: 5px 0;
    color: #2196F3;
    font-weight: 600;
    font-size: 14px;
}

.htt-session-actions {
    margin-top: 15px;
}

.htt-join-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.htt-join-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.htt-claimed-badge {
    display: inline-block;
    background: #e0e0e0;
    color: #666;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Therapist chat box in dashboard */
.htt-therapist-dashboard .htt-chatbox {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    height: 600px;
    margin-top: 20px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .htt-chatbox {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .htt-floating-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .htt-sessions-grid {
        grid-template-columns: 1fr;
    }

    .htt-message {
        max-width: 85%;
    }
}