/* View Request Modal Styles */

/* Modal overlay - must be above chat modal (z-index 10002) */
#view-request-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10100;
    backdrop-filter: blur(2px);
}

#view-request-modal.hidden {
    display: none;
}

.view-request-content {
    max-width: 420px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 16px;
    background: var(--bg-primary, #ffffff);
    padding: 0;
}

/* Header */
.view-request-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 1.5rem;
    text-align: center;
    color: white;
    position: relative;
}

.view-request-header .request-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.view-request-header .request-icon i {
    font-size: 1.25rem;
    color: white;
}

.view-request-header .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: white;
}

/* Status Badge */
.request-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.request-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.request-status-badge.accepted {
    background: #d1fae5;
    color: #065f46;
}

.request-status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.request-status-badge.deleted {
    background: #f3f4f6;
    color: #6b7280;
}

/* Body */
.view-request-body {
    padding: 1rem 1.25rem;
}

/* Sections */
.request-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.request-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.request-section .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.request-section .section-header i {
    color: #d97706;
    font-size: 0.8rem;
    width: 16px;
}

.request-section .section-header span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.request-section .section-content {
    padding-left: 24px;
}

.request-section .section-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 0.25rem 0;
}

.request-section .package-description {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.4;
}

/* Tutor Info */
.tutor-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-container {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.tutor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f59e0b;
}

.initials-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: white;
}

.tutor-info span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

/* Courses List */
.courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.courses-list .course-tag {
    background: #fef3c7;
    color: #92400e;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Format Badges */
.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.format-badges .format-tag {
    background: #d1fae5;
    color: #065f46;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.format-badges .format-tag i {
    font-size: 0.6rem;
}

/* Schedule Section */
.schedule-section .section-content {
    background: #fffbeb;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    margin-left: 24px;
}

.schedule-info {
    font-size: 0.8rem;
    color: #78350f;
    line-height: 1.4;
}

.schedule-info .schedule-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.25rem;
}

.schedule-info .schedule-row:last-child {
    margin-bottom: 0;
}

.schedule-info .schedule-row i {
    font-size: 0.65rem;
    color: #d97706;
    width: 14px;
}

/* Pricing Section */
.pricing-section .section-content {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-left: 24px;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: white;
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
}

.price-unit {
    font-size: 0.75rem;
    opacity: 0.9;
}

.discounts-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.discounts-row .discount-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 500;
}

/* User Message */
.user-message {
    font-size: 0.85rem;
    color: var(--text-primary, #1f2937);
    background: var(--bg-secondary, #f9fafb);
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

/* Request Meta */
.request-meta {
    background: var(--bg-secondary, #f9fafb);
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.request-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.35rem;
}

.request-meta .meta-item:last-child {
    margin-bottom: 0;
}

.request-meta .meta-item i {
    color: #9ca3af;
    font-size: 0.7rem;
    width: 14px;
}

.request-meta .meta-item strong {
    color: var(--text-primary, #1f2937);
    font-weight: 500;
}

/* Footer Actions */
.view-request-footer {
    display: flex;
    gap: 12px;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    border-radius: 0 0 16px 16px;
}

.view-request-footer button {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.view-request-footer .btn-reject {
    background: #fee2e2;
    color: #991b1b;
}

.view-request-footer .btn-reject:hover {
    background: #fecaca;
}

.view-request-footer .btn-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.view-request-footer .btn-accept:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Close button positioning */
.view-request-content .modal-close-enhanced {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.view-request-content .modal-close-enhanced:hover {
    background: rgba(255, 255, 255, 0.3);
}

.view-request-content .modal-close-enhanced svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Dark mode support */
[data-theme="dark"] .view-request-content {
    background: var(--bg-primary, #1f2937);
}

[data-theme="dark"] .request-section {
    border-color: var(--border-color, #374151);
}

[data-theme="dark"] .user-message {
    background: var(--bg-secondary, #374151);
}

[data-theme="dark"] .request-meta {
    background: var(--bg-secondary, #374151);
}

[data-theme="dark"] .view-request-footer {
    background: var(--bg-secondary, #374151);
    border-color: var(--border-color, #374151);
}

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

/* Tablet (768px) */
@media (max-width: 768px) {
    .view-request-content {
        max-width: 95%;
        width: 95%;
        max-height: 90vh;
    }

    .view-request-header {
        padding: 1.25rem;
    }

    .view-request-header .modal-title {
        font-size: 1.1rem;
    }

    .view-request-body {
        padding: 0.875rem 1rem;
    }

    .request-section .section-content {
        padding-left: 20px;
    }

    .pricing-section .section-content,
    .schedule-section .section-content {
        margin-left: 20px;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    #view-request-modal {
        padding: 0.5rem;
    }

    .view-request-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 12px;
        margin: 0.5rem;
    }

    .view-request-header {
        padding: 1rem;
    }

    .view-request-header .request-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }

    .view-request-header .request-icon i {
        font-size: 1rem;
    }

    .view-request-header .modal-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .request-status-badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }

    .view-request-body {
        padding: 0.75rem;
    }

    .request-section {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .request-section .section-header {
        margin-bottom: 0.375rem;
    }

    .request-section .section-header span {
        font-size: 0.65rem;
    }

    .request-section .section-content {
        padding-left: 0;
    }

    .request-section .section-content h4 {
        font-size: 0.9rem;
    }

    .tutor-info {
        gap: 8px;
    }

    .avatar-container,
    .tutor-avatar {
        width: 32px;
        height: 32px;
    }

    .tutor-info span {
        font-size: 0.85rem;
    }

    .courses-list .course-tag,
    .format-badges .format-tag {
        padding: 0.15rem 0.4rem;
        font-size: 0.65rem;
    }

    .schedule-section .section-content {
        padding: 0.5rem 0.6rem;
        margin-left: 0;
    }

    .schedule-info {
        font-size: 0.75rem;
    }

    .pricing-section .section-content {
        padding: 0.6rem 0.75rem;
        margin-left: 0;
    }

    .price-amount {
        font-size: 1.25rem;
    }

    .price-unit {
        font-size: 0.7rem;
    }

    .discounts-row .discount-tag {
        font-size: 0.6rem;
    }

    .user-message {
        font-size: 0.8rem;
        padding: 0.6rem;
    }

    .request-meta {
        padding: 0.6rem 0.75rem !important;
    }

    .request-meta .meta-item {
        font-size: 0.7rem;
    }

    .view-request-footer {
        flex-direction: column;
        gap: 8px;
        padding: 0.75rem;
    }

    .view-request-footer button {
        padding: 0.65rem 0.875rem;
        font-size: 0.8rem;
    }

    .view-request-content .modal-close-enhanced {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }

    .view-request-content .modal-close-enhanced svg {
        width: 16px;
        height: 16px;
    }
}

/* Extra small phones (375px) */
@media (max-width: 375px) {
    .view-request-content {
        border-radius: 8px;
        margin: 0.25rem;
    }

    .view-request-header {
        padding: 0.875rem;
    }

    .view-request-header .modal-title {
        font-size: 0.95rem;
    }

    .view-request-body {
        padding: 0.625rem;
    }

    .request-section .section-content h4 {
        font-size: 0.85rem;
    }

    .price-amount {
        font-size: 1.1rem;
    }

    .view-request-footer button {
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .view-request-content {
        max-height: 95vh;
    }

    .view-request-header {
        padding: 0.75rem 1rem;
    }

    .view-request-header .request-icon {
        display: none;
    }

    .view-request-body {
        padding: 0.5rem 1rem;
    }

    .request-section {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
}
