/* Stream Live Page Styles
   This stylesheet contains all main styling for the Live.cshtml page
   Dynamic color variables are injected via inline style tag in the page
*/

/* Root Variables - Set inline with ViewBag values */
:root {
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --error-color: #dc3545;
    --error-bg: #fff5f5;
    --error-border: #feb2b2;
}

/* Base Body Styling */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Enhanced Error Display ===== */
.validation-errors {
    margin-bottom: 2rem;
    animation: slideInDown 0.4s ease-out;
}

.error-card {
    background: var(--error-bg);
    border: 2px solid var(--error-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.error-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--error-color);
}

.error-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.error-header i {
    font-size: 1.5rem;
    color: var(--error-color);
    animation: pulse 2s infinite;
}

.error-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--error-color);
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--error-color);
    animation: fadeInLeft 0.3s ease-out;
    transition: var(--transition);
}

.error-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.error-item:last-child {
    margin-bottom: 0;
}

.error-item i {
    color: var(--error-color);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.error-item span {
    color: #721c24;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Enhanced SweetAlert Customizations ===== */
.swal-modal {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
}

.swal-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    padding: 1.5rem 2rem !important;
}

.swal-text {
    font-size: 1.1rem !important;
    color: #495057 !important;
    padding: 0 2rem !important;
    margin-bottom: 2rem !important;
}

.swal-icon {
    margin: 2rem auto 1.5rem !important;
}

.swal-icon--success {
    border-color: #28a745 !important;
}

.swal-icon--error {
    border-color: #dc3545 !important;
}

.swal-icon--warning {
    border-color: #ffc107 !important;
}

.swal-icon--info {
    border-color: #17a2b8 !important;
}

.swal-button {
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 0.875rem 2.5rem !important;
    transition: var(--transition) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.swal-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

.swal-button--confirm {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
}

.swal-button--cancel {
    background: #6c757d !important;
}

.swal-button--danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.swal-footer {
    padding: 1.5rem 2rem !important;
}

/* ===== Video Container Enhancements ===== */
.video-wrapper {
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    z-index: 1;
}

/* Primary color buttons */
#VoteForMotions {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

  #VoteForMotions:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 0.9;
  }

/* ===== Enhanced Tab Navigation ===== */
.event-info-tabs .tab-buttons {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border: none;
}

.event-info-tabs .tab-btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: white;
}

  .event-info-tabs .tab-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: white;
  }

.event-info-tabs .tab-btn.active-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

  .event-info-tabs .tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: var(--primary-color);
    transition: transform 0.3s ease;
    color: white;
  }

.event-info-tabs .tab-btn.active-btn::before {
    transform: translateX(-50%) scaleX(1);
}

/* ===== Content Cards ===== */
.content-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.tabs-content .tab {
    opacity: 0;
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tabs-content .tab.active-tab {
    display: block;
    opacity: 1;
}

/* ===== Enhanced Form Styling ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.form-control,
select.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8f9fa;
    width: 100%;
    color: #2c3e50;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-control:focus,
select.form-control:focus {
    border-color: var(--primary-color);
    background-color: white;
    outline: none;
}

select.form-control:focus {
    background-color: white;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
}

select.form-control option {
    color: #2c3e50;
    background-color: white;
    padding: 0.5rem;
}

select.form-control option:hover {
    background-color: #e9ecef;
    color: #2c3e50;
}

select.form-control option:checked {
    background: linear-gradient(#e9ecef, #e9ecef);
    background-color: #e9ecef !important;
    color: #2c3e50 !important;
}

/* ===== Enhanced Buttons ===== */
.btn-primary,
.btn-danger,
.btn-success,
.btn-info {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-primary::before,
.btn-danger::before,
.btn-success::before,
.btn-info::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-danger:hover::before,
.btn-success:hover::before,
.btn-info:hover::before {
    width: 300px;
    height: 300px;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Chat/AI Assistant Enhancements ===== */
.chatbot-container {
    margin-top: 2rem;
}

.chatbot-container .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.chatbot-container .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 1.5rem;
    border: none;
}

.chatbot-container .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

#chatbot-messages {
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 500px;
}

#chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* ===== Alert Enhancements ===== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.alert-info {
    background: #e7f3ff;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

/* ===== Table Enhancements ===== */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

/* ===== Navigation Pills ===== */
.nav-tabs-clean {
    border: none;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.nav-tabs-clean .nav-link {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #495057;
    font-weight: 600;
    transition: var(--transition);
}

.nav-tabs-clean .nav-link:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.nav-tabs-clean .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Security Details Badge ===== */
.security-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.55rem;
    color: #495057;
    margin: 0.5rem;
}

/* ===== Loading States ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ===== Avatar Enhancements ===== */
.avatar-img {
    max-width: 90px;
    max-height: 90px;
    border-radius: 50%;
    object-fit: cover;
    transition: var(--transition);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.avatar-img:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

/* ===== Panel Enhancements ===== */
.panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.panel-hdr {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.panel-hdr h6 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.panel-content {
    padding: 1.5rem;
}

/* ===== Legacy Styling Compatibility ===== */
button,
select {
    border-style: solid;
    padding: 3px;
}

.news-block .btn-box a {
    border: 1px solid;
}

.event-detail .content-box p {
    color: #000000;
    margin-bottom: 5px;
}

/* ===== Enhanced Question Cards Styling ===== */
.question-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary-color);
    position: relative;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
    transition: width 0.3s ease;
}

.question-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.question-card:hover::before {
    width: 100%;
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.question-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.question-meta {
    flex: 1;
    min-width: 0;
}

.question-asker {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-asker .asker-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.question-topic {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    display: inline-block;
    background: #f0f4ff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    margin-right: 0.5rem;
}

.question-timestamp {
    font-size: 0.8rem;
    color: #95a5a6;
    margin: 0;
}

.question-body {
    padding: 1rem 0;
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.question-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.question-action-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.question-action-btn:hover {
    background: #f0f4ff;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.question-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-answered {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== Empty State Styling ===== */
.questions-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #95a5a6;
}

.questions-empty-state i {
    font-size: 3rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
    display: block;
}

.questions-empty-state h5 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* ===== Questions Container Styling ===== */
#myquestions,
#getMembersQuestions {
    display: flex;
    flex-direction: column;
}

/* ===== Question Count Badge ===== */
.questions-count-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* ===== Loading Animation for Questions ===== */
.questions-loading {
    text-align: center;
    padding: 2rem;
}

.questions-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(102, 126, 234, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Enhanced Tab Content for Questions ===== */
.tab-pane {
    animation: fadeIn 0.4s ease-out;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .question-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .question-header {
        gap: 0.75rem;
    }

    .question-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .question-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .question-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .event-info-tabs .tab-btn {
        min-width: 100px;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .btn-primary,
    .btn-danger,
    .btn-success,
    .btn-info {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .avatar-img {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px;
        max-height: 70px;
    }

    .jumbotron {
        padding: 2rem 1.5rem;
    }

    .video-wrapper {
        border-radius: 8px;
    }

    .error-card {
        padding: 1rem;
    }

    .error-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-card {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .question-card {
        padding: 0.75rem;
        border-left-width: 4px;
    }

    .question-header {
        gap: 0.5rem;
    }

    .question-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .question-asker {
        font-size: 0.9rem;
    }

    .question-body {
        font-size: 0.9rem;
    }

    .question-topic {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .question-action-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .event-info_tabs .tab-buttons {
        padding: 0.75rem;
        gap: 0.25rem;
    }

    .event-info-tabs .tab-btn {
        min-width: 80px;
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .avatar-img {
        width: 60px !important;
        height: 60px !important;
        max-width: 60px;
        max-height: 60px;
    }

    .content-card {
        padding: 1rem;
    }

    .error-card {
        padding: 0.75rem;
    }

    .error-item {
        padding: 0.5rem;
        padding-left: 0.75rem;
    }
}
