
/* Modal Button Improvements for Icon Alignment */

/* Ensure icon centering in all buttons */
.btn i,
.btn-glass i,
.btn-glass-primary i,
.btn-glass-secondary i,
.btn-glass-success i,
.btn-glass-danger i,
.btn-glass-info i,
.btn-glass-warning i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

/* Fix icon spacing */
.btn i.fas,
.btn i.fab,
.btn i.far {
    margin-right: 0.5rem;
}

/* Fix icon-only buttons */
.btn.btn-icon i.fas,
.btn.btn-icon i.fab,
.btn.btn-icon i.far {
    margin-right: 0;
}

/* Ensure consistent spacing in button text */
.btn span {
    display: inline-block;
    vertical-align: middle;
}

/* Improve cart buttons specifically */
#customOptionsBtn i,
#viewCartBtn i,
.cart-related-button i {
    position: relative;
    top: -1px;
}

/* Modal Improvements CSS */

/* Modal z-index fixes to prevent conflicts */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1055 !important;
}

.modal.show {
    z-index: 1060 !important;
    display: block !important;
}

.modal-dialog {
    z-index: 1061 !important;
}

/* Prevent custom modals from interfering with Bootstrap modals */
div[id*="customDeleteModal"] {
    z-index: 999999 !important;
}

/* Ensure multi-delete modals appear correctly */
#multiDeleteARModal,
#multiDeleteImagesModal {
    z-index: 1060 !important;
}

#multiDeleteARModal.show,
#multiDeleteImagesModal.show {
    display: block !important;
}

/* Fix modal positioning and centering */
.modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
}

/* Ensure modal backdrop covers full screen */
.modal-backdrop.show {
    opacity: 0.5;
}

/* Modal content styling */
.modal-content {
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Ensure proper button visibility in modals */
.modal .btn {
    position: relative;
    z-index: 1;
}

/* Base text colors and styling */
.text-white {
    color: white !important;
}

/* Badge styling */
.badge.bg-primary {
    background-color: #1E3A8A !important;
    color: white;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-block;
}

/* Modal title styling */
.modal-glass .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Modal image container */
.image-frame {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

/* Details list container */
.image-details-list {
    margin-bottom: 15px;
    text-align: left;
    padding-left: 5px;
}

/* Individual detail item */
.detail-item {
    margin-bottom: 12px;
    display: block;
    text-align: left;
}

/* Detail label styling */
.detail-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-weight: 500;
    text-align: left;
    display: block;
}

/* Detail value styling */
.detail-value {
    color: white;
    font-weight: 500;
    word-break: break-word;
    line-height: 1.4;
    text-align: left;
    display: block;
}

/* Category badges container */
.category-badges {
    display: flex;
    flex-wrap: wrap;
    margin-top: 3px;
}

/* Description box styling */
.description-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    margin-bottom: 8px;
}

.description-box p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Custom scrollbar styling */

/* Credit purchase modal badge fixes */
.glass-card {
    position: relative;
    overflow: visible !important;
}

.glass-card .badge {
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Fix for modal badge positioning on desktop */
@media (min-width: 768px) {
    .glass-card .badge.bg-info,
    .glass-card .badge.bg-success {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        transform: translate(10%, -30%);
    }
}

.description-box::-webkit-scrollbar {
    width: 4px;
}

.description-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.description-box::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 8px;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 16px 12px;
    }
    
    .image-details-list {
        margin-bottom: 12px;
    }
    
    .detail-item {
        margin-bottom: 10px;
    }
    
    .detail-label {
        font-size: 0.8rem;
    }
    
    .detail-value {
        font-size: 0.9rem;
    }
    
    .badge.bg-primary {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .description-box {
        max-height: 100px;
    }
}