/* Custom Styles - Extracted from inline attributes for CSP compliance */

/* Organization Management - Modal Loading State */
.modal-loading.show {
    display: block !important;
}

/* API Access Management - Public Key Textarea */
.public-key-textarea-inline {
    max-width: 600px;
}

/* User Management - Modal Loading State */
.user-modal .modal-loading.show {
    display: block !important;
}

.user-modal .custom-password-group {
    display: none;
}

.user-modal .custom-password-group.show {
    display: block;
}

/* Event Detail - Cover Image */
.event-cover-image {
    height: 400px;
    object-fit: cover;
}

/* Event Detail - Sticky Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 20px;
    z-index: 1;
    align-self: flex-start;
}

/* Event Detail - QR Code */
.event-qr-code {
    max-width: 150px;
}

/* Event Detail - Gallery Modal Navigation */
.gallery-nav-btn {
    z-index: 10;
    opacity: 0.7;
}

.gallery-current-image {
    max-height: 70vh;
}

/* Event Management - Table Column Widths */
.event-table th.col-number,
.col-number {
    width: 60px;
}

.col-ticket-num {
    width: 120px;
}

.event-table th.col-cover {
    width: 80px;
}

.event-table th.col-creator {
    width: 120px;
}

.event-table th.col-status {
    width: 120px;
}

.event-table th.col-actions {
    width: 200px;
}

/* Event Management - Cover Image Thumbnail */
.event-cover-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.event-cover-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 6px;
}

/* Event Details - Cover Image Placeholder (in modal) */
.event-cover-image {
    max-height: 250px;
    width: 100%;
    object-fit: cover;
}

.event-cover-placeholder {
    height: 250px;
    width: 100%;
}

/* Event Detail Page - Cover Image */
.card-img-top.event-cover-image {
    height: 400px;
    max-height: none;
    object-fit: cover;
}

/* API Documentation - Code Syntax Highlighting */
.api-code-keyword {
    color: #569cd6;
}

.api-code-string {
    color: #ce9178;
}

.api-code-function {
    color: #dcdcaa;
}

.api-code-comment {
    color: #6a9955;
}

.api-code-number {
    color: #b5cea8;
}

.api-code-property {
    color: #9cdcfe;
}

.api-code-boolean {
    color: #569cd6;
}

/* Syntax highlighting utility classes */
.syntax-keyword { color: #569cd6; }
.syntax-string { color: #ce9178; }
.syntax-function { color: #dcdcaa; }
.syntax-comment { color: #6a9955; }
.syntax-number { color: #b5cea8; }
.syntax-property { color: #9cdcfe; }
.syntax-boolean { color: #569cd6; }

/* Fee Info Details - Toggle */
.fee-info-details {
    display: none;
    margin-top: 0.5rem;
}

.fee-info-details.show {
    display: block;
}

/* Toast Notification */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Ticket QR Code Placeholders */
.ticket-qr-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-qr-large {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
}

/* Event List Cover Images */
.event-list-cover {
    height: 200px;
    object-fit: cover;
}

.event-list-cover-placeholder {
    height: 200px;
}

/* Event Detail - Ticket Selection */
.ticket-selection {
    transition: all 0.2s ease;
}

.ticket-selection:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(0, 85, 198, 0.05);
}

.ticket-qty {
    width: 60px;
}

.is-invalid {
    border-color: #dc3545;
}

/* Event Detail - Image Gallery Grid */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item-wrapper:hover .gallery-item-image {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.gallery-item-wrapper:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-caption {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0 0.5rem;
    word-wrap: break-word;
    line-height: 1.3;
}

/* Gallery Modal */
#gallery-current-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.image-thumbnails {
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-thumbnail:hover {
    transform: scale(1.1);
}

.gallery-thumbnail.active {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

#gallery-prev-btn:hover,
#gallery-next-btn:hover {
    opacity: 1 !important;
    transform: scale(1.05);
}

/* Responsive gallery grid */
@media (max-width: 768px) {
    .image-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .image-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
}

/* Event Management - Modal and Form Elements */
.modal-content-hidden {
    display: none;
}

.event-tab-content {
    overflow-y: auto;
}

.cover-image-preview {
    display: none;
}

.cover-image-preview.show {
    display: block;
}

.cover-preview-img {
    max-width: 200px;
    max-height: 150px;
}

.btn-step-hidden {
    display: none;
}

.action-buttons-hidden {
    display: none;
}

/* Utility display classes */
.d-block {
    display: block !important;
}

.d-none {
    display: none !important;
}

.d-inline-block {
    display: inline-block !important;
}

.d-flex {
    display: flex !important;
}

/* Modal navigation hidden */
.modal-navigation-hidden {
    display: none;
}

/* Alert positioning */
.alert-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Image cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Gallery thumbnail */
.gallery-thumbnail-small {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
}

.gallery-thumbnail-active {
    border: 3px solid #007bff;
}

/* Additional image preview thumbnails */
.additional-image-thumb {
    max-width: 120px;
    max-height: 80px;
}

.additional-image-remove-btn {
    margin: -5px;
}

.additional-image-remove-icon {
    font-size: 10px;
}

/* Print Styles */
@media print {
    /* Order Confirmation Print */
    .btn, .alert-info, .card-header {
        display: none !important;
    }
    .card {
        border: 1px solid #000 !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
    
    /* Ticket Detail Print */
    body * {
        visibility: hidden;
    }
    .card, .card * {
        visibility: visible;
    }
    .card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
    }
    .text-center.mt-4 {
        display: none !important;
    }
}
