﻿/* =============================================
   Support Module Styles
   DreamLoop Crafts E-Commerce Platform
   ============================================= */

/* Hero Section */
.support-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.support-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-image {
    max-width: 350px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.search-box .form-control {
    border-radius: 50px 0 0 50px;
    padding-left: 25px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.search-box .btn {
    border-radius: 0 50px 50px 0;
    padding: 0 30px;
}

/* Quick Actions */
.action-card {
    display: block;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    color: inherit;
}

.action-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #fff;
}

.action-card h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

.action-card p {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Stats Box */
.stat-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Ticket List */
.ticket-item {
    display: block;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.ticket-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: inherit;
}

.ticket-card {
    transition: all 0.2s ease;
}

.ticket-card:hover {
    border-left: 4px solid #007bff;
}

.ticket-card.has-unread {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

/* Category Cards */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 15px;
    padding: 25px 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    min-height: 120px;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #007bff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: #007bff;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #007bff;
}

/* Category Selector (Create Ticket) */
.category-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.category-option {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-option:hover {
    background: #e9ecef;
}

.category-option.selected,
.category-option:has(input:checked) {
    border-color: #007bff;
    background: #e7f1ff;
}

.category-option label {
    cursor: pointer;
    margin-bottom: 0;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #007bff;
    background: #f8f9ff;
}

.file-item {
    background: #f8f9fa;
}

/* Messages Container */
.messages-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.message-item {
    margin-bottom: 20px;
}

.message-customer {
    padding-left: 0;
}

.message-agent {
    padding-left: 40px;
}

.message-system {
    text-align: center;
}

.message-bubble {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message-customer .message-bubble {
    background: #e7f1ff;
    border-color: #cce5ff;
    border-bottom-left-radius: 5px;
}

.message-agent .message-bubble {
    background: #fff;
    border-left: 3px solid #007bff;
    border-bottom-right-radius: 5px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.message-content {
    line-height: 1.6;
}

.message-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.attachment-link {
    display: inline-block;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    text-decoration: none;
}

.attachment-link:hover {
    background: #e9ecef;
}

.system-message {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Ticket Details Sidebar */
.ticket-details li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.ticket-details li:last-child {
    border-bottom: none;
}

.ticket-details .label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-stars input:checked~label,
.rating-stars label:hover,
.rating-stars label:hover~label {
    color: #ffc107;
}

/* FAQ Styles */
.faq-category {
    margin-bottom: 30px;
}

.category-header {
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, .125);
}

.faq-feedback .btn {
    font-size: 0.8rem;
    padding: 3px 10px;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Contact Options */
.contact-box {
    padding: 20px;
}

/* Live Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
}

.chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h6 {
    margin: 0;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.chat-message.sent {
    align-items: flex-end;
}

.chat-message.received {
    align-items: flex-start;
}

.chat-message .bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.chat-message.sent .bubble {
    background: #007bff;
    color: #fff;
    border-bottom-right-radius: 5px;
}

.chat-message.received .bubble {
    background: #fff;
    border: 1px solid #eee;
    border-bottom-left-radius: 5px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 20px;
    outline: none;
}

.chat-input input:focus {
    border-color: #007bff;
}

.chat-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #007bff;
    color: #fff;
    cursor: pointer;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .support-hero {
        padding: 50px 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .chat-window {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        bottom: 80px;
        height: 60vh;
    }

    .message-agent {
        padding-left: 0;
    }

    .category-selector {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Support (Modern UI layer)
   ============================================= */

.support-page {
    background: radial-gradient(1200px 600px at 10% 0%, rgba(13, 110, 253, 0.06), transparent 60%),
        radial-gradient(900px 600px at 90% 10%, rgba(255, 193, 7, 0.08), transparent 55%),
        #f7f8fb;
}

.support-shell {
    max-width: 1120px;
}

.support-hero-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.14), rgba(255, 193, 7, 0.14));
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 18px;
}

.support-hero-header .title {
    font-weight: 750;
    letter-spacing: -0.02em;
    margin: 0;
}

.support-hero-header .subtitle {
    color: #6c757d;
    margin: 6px 0 0;
}

.support-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
    overflow: hidden;
}

.support-card .card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.support-soft {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.support-badge {
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-weight: 600;
}

.support-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #6c757d;
    font-size: 0.9rem;
}

.support-meta i {
    opacity: 0.8;
}

.messages-container {
    max-height: 650px;
    overflow-y: auto;
    padding: 2px 8px 2px 2px;
}

.message-item {
    margin-bottom: 14px;
}

.message-bubble {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06);
}

.message-customer .message-bubble {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.10), rgba(13, 110, 253, 0.06));
    border-color: rgba(13, 110, 253, 0.18);
}

.message-agent .message-bubble {
    background: #fff;
}

.message-header {
    font-size: 0.92rem;
}

.message-header .badge {
    border-radius: 999px;
}

.message-content {
    line-height: 1.7;
    color: #111827;
}

.message-attachments {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(17, 24, 39, 0.04);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.attachment-link:hover {
    background: rgba(13, 110, 253, 0.08);
}

.system-message {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    background: rgba(17, 24, 39, 0.04);
    color: #4b5563;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.category-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.category-option {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 14px;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.category-option.selected,
.category-option:has(input:checked) {
    border-color: rgba(13, 110, 253, 0.55);
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.10), rgba(255, 255, 255, 0.75));
}

.file-upload-area {
    border: 1.5px dashed rgba(0, 0, 0, 0.18);
    border-radius: 18px;
    padding: 34px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.65);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: rgba(13, 110, 253, 0.55);
    background: rgba(13, 110, 253, 0.06);
}
