/* Persian RTL Styling for Aparat Streaming Platform */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: none;
    margin-bottom: 16px;
    border-radius: 8px;
}

.card-header {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    font-weight: 500;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
}

.form-input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-checkbox {
    width: 18px;
    height: 18px;
    margin-left: 8px;
}

.table {
    margin-top: 20px;
}

.badge {
    padding: 5px 10px;
    border-radius: 4px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-nav.navbar-nav {
    align-items: center;
}

.navbar-nav .navbar-text {
    margin-bottom: 0;
    display: inline-block;
    vertical-align: middle;
}

.progress {
    height: 8px;
    margin-top: 10px;
    border-radius: 4px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
    font-size: 0.7rem;
    line-height: 8px;
}

.alert {
    border-radius: 6px;
    margin-bottom: 16px;
    border: none;
    border-right: 3px solid;
}

/* Support Chat Widget Styles */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0066cc 0%, #cc0000 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.chat-toggle-btn .chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
}

.support-chat-widget {
    position: fixed;
    bottom: 110px;
    left: 30px;
    width: 380px;
    height: 500px;
    z-index: 999;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-chat-widget .card {
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

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

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

.message-user {
    text-align: right;
}

.message-support {
    text-align: left;
}

.message-text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 5px;
}

/* Scrollbar styling for chat */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments for mobile - Simple & Minimal */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    .main-content {
        padding-bottom: 80px !important;
    }
    
    /* Simplified cards - minimal design */
    .card {
        margin-bottom: 12px;
        border: none;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        border-radius: 8px;
    }
    
    .card-header {
        padding: 12px 15px;
        font-size: 0.95rem;
        font-weight: 600;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Table responsive - clean card design */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e8e8e8;
        border-radius: 6px;
        padding: 12px;
        background: white;
        box-shadow: none;
    }
    
    .table tbody td {
        display: block;
        text-align: right;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
        padding-top: 8px;
    }
    
    .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #666;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Minimal buttons */
    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
        border-radius: 6px;
        font-weight: 500;
        border: none;
    }
    
    .btn-sm {
        font-size: 0.85rem;
        padding: 8px 16px;
        border-radius: 5px;
    }
    
    .btn-primary {
        background: #0d6efd;
        box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
    }
    
    .btn-primary:hover {
        background: #0b5ed7;
        box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
    }
    
    .btn-outline-danger, .btn-outline-primary {
        border-width: 1.5px;
    }
    
    /* Clean headers */
    h1, h2 {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: #1a1a1a;
    }
    
    h3 {
        font-size: 1.15rem;
        font-weight: 600;
        color: #1a1a1a;
    }
    
    h4, h5 {
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Clean forms */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
        border: 1.5px solid #ddd;
        border-radius: 6px;
        background: #fff;
    }
    
    .form-control:focus, .form-select:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    }
    
    label {
        font-weight: 500;
        font-size: 0.9rem;
        color: #333;
        margin-bottom: 6px;
    }
    
    /* Minimal navbar */
    .navbar {
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .navbar-nav {
        padding-top: 8px;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 15px;
        font-size: 0.95rem;
        font-weight: 500;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link.active {
        background: rgba(255,255,255,0.1);
    }
    
    .navbar-text {
        font-size: 0.9rem;
        margin: 8px 0;
        font-weight: 500;
    }
    
    /* Clean grid */
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .row > * {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .row .col-md-4,
    .row .col-md-3,
    .row .col-md-6 {
        margin-bottom: 12px;
    }
    
    /* Simplified flex utilities */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 12px;
    }
    
    .d-flex.justify-content-between.align-items-center {
        align-items: flex-start !important;
    }
    
    /* Remove extra spacing */
    .mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    .mt-4 {
        margin-top: 1.25rem !important;
    }
    
    /* Minimal chat button */
    .chat-toggle-btn {
        bottom: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    
    /* Clean badges */
    .badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        font-weight: 500;
        border-radius: 4px;
        text-transform: none;
    }
    
    /* Simple alerts */
    .alert {
        font-size: 0.9rem;
        padding: 12px 15px;
        border-radius: 6px;
        border: none;
        border-right: 3px solid;
    }
    
    .alert-info {
        background: #e7f3ff;
        border-color: #0d6efd;
        color: #0c5460;
    }
    
    .alert-success {
        background: #d1e7dd;
        border-color: #198754;
        color: #0f5132;
    }
    
    .alert-danger {
        background: #f8d7da;
        border-color: #dc3545;
        color: #842029;
    }
    
    .alert-warning {
        background: #fff3cd;
        border-color: #ffc107;
        color: #664d03;
    }
    
    /* Clean progress bars */
    .progress {
        height: 8px;
        border-radius: 4px;
        background: #e9ecef;
    }
    
    .progress-bar {
        border-radius: 4px;
        font-size: 0.7rem;
        line-height: 8px;
        padding: 0 4px;
    }
    
    /* Dashboard cards - minimal */
    .card-body h3 {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1a1a1a;
        margin-bottom: 8px;
    }
    
    .card-body p.text-muted {
        font-size: 0.85rem;
        margin-bottom: 10px;
        color: #6c757d;
    }
    
    /* Clean action buttons in tables */
    .table tbody td .btn {
        width: 100%;
        margin-top: 6px;
        font-weight: 500;
    }
    
    .table tbody td form {
        width: 100%;
    }
    
    .table tbody td .d-inline {
        display: block !important;
    }
    
    .table tbody td .d-inline .btn {
        width: 100%;
        margin-top: 6px;
    }
    
    /* Minimal dashboard actions */
    .card-body .d-flex.gap-2 .btn {
        flex: 1 1 auto;
        min-width: 0;
        font-weight: 500;
    }
    
    /* Simplified spacing */
    .gap-3 {
        gap: 12px !important;
    }
    
    .gap-2 {
        gap: 10px !important;
    }
    
    /* Chat modal improvements */
    .support-chat-modal-content {
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        max-width: 100% !important;
    }
    
    /* Clean form inputs */
    .form-control, .form-select, .form-input {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 15px !important;
        border: 1.5px solid #ddd !important;
        border-radius: 6px !important;
    }
    
    .form-control:focus, .form-select:focus {
        border-color: #0d6efd !important;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1) !important;
    }
    
    /* File input */
    input[type="file"] {
        font-size: 14px;
        padding: 8px !important;
    }
    
    /* Textarea */
    textarea.form-control {
        min-height: 100px;
        font-size: 16px;
        resize: vertical;
    }
    
    /* Form buttons - full width on mobile */
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
        font-weight: 500;
    }
    
    /* Clean tables in cards */
    .card-body .table-responsive {
        margin: -15px;
        padding: 15px;
    }
    
    /* Professional touch targets */
    .btn, a.btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Minimal navbar toggle */
    .navbar-toggler {
        padding: 6px 10px;
        font-size: 1rem;
        border: 1px solid rgba(255,255,255,0.3);
    }
    
    /* Remove unnecessary elements on mobile */
    .text-muted small {
        font-size: 0.8rem;
    }
    
    /* Clean video cards */
    .card .card-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .card .card-text {
        font-size: 0.85rem;
        color: #6c757d;
    }
    
    /* Simplified dashboard stats */
    .card.text-center .card-body {
        padding: 20px 15px;
    }
    
    .card.text-center h3 {
        font-size: 1.75rem;
        font-weight: 600;
        margin-bottom: 6px;
    }
    
    /* Remove extra borders and shadows */
    .table-striped tbody tr:nth-of-type(odd) {
        background-color: transparent;
    }
    
    /* Professional color scheme */
    body {
        background: #f8f9fa;
    }
    
    .card {
        background: #ffffff;
    }
}

