/* ZBeauty Lab Custom Branding Styles */

:root {
    --zbeauty-primary: #e91e63;
    --zbeauty-secondary: #9c27b0;
    --zbeauty-accent: #ff4081;
    --zbeauty-dark: #2c3e50;
}

/* Logo Styling */
.logo-text {
    background: linear-gradient(135deg, var(--zbeauty-primary) 0%, var(--zbeauty-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

/* Primary Button Override for Beauty Theme */
.btn-primary {
    background: linear-gradient(135deg, var(--zbeauty-primary) 0%, var(--zbeauty-secondary) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--zbeauty-secondary) 0%, var(--zbeauty-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Avatar Name Circle Colors */
.avatar-name {
    background: linear-gradient(135deg, var(--zbeauty-primary) 0%, var(--zbeauty-secondary) 100%);
    color: white;
}

/* Custom Badge Colors */
.badge-zbeauty {
    background: linear-gradient(135deg, var(--zbeauty-primary) 0%, var(--zbeauty-secondary) 100%);
    color: white;
}

/* Gallery Image Hover Effect */
.gallery-thumb {
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

/* Table Row Hover */
.table tbody tr:hover {
    background-color: rgba(233, 30, 99, 0.05);
}

/* Search Box Focus */
.search-input:focus {
    border-color: var(--zbeauty-primary);
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 99, 0.25);
}

/* Navbar Vertical Custom Styling */
.navbar-vertical .nav-link:hover {
    background-color: rgba(233, 30, 99, 0.1);
}

.navbar-vertical .nav-link.active {
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--zbeauty-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--zbeauty-primary) 0%, var(--zbeauty-secondary) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--zbeauty-secondary);
}

/* Loading Animation */
@keyframes zbeauty-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.zbeauty-loading {
    animation: zbeauty-pulse 1.5s ease-in-out infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .logo-text {
        font-size: 1rem;
    }
}

/* Cursor Pointer Helper */
.cursor-pointer {
    cursor: pointer;
}

/* Image Preview Styles */
.img-thumbnail {
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.img-thumbnail:hover {
    border-color: var(--zbeauty-primary);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

/* Modal Image Styles */
#imageModal .modal-body,
#galleryImageModal .modal-body,
#contactDetailModal .modal-body {
    background-color: #f8f9fa;
}

#imageModal .modal-body img,
#galleryImageModal .modal-body img {
    transition: transform 0.3s ease;
}

#imageModal .modal-body img:hover,
#galleryImageModal .modal-body img:hover {
    transform: scale(1.02);
}

/* Fix modal z-index issues - Ensure modals are always on top */
.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal {
    z-index: 1055 !important;
    background: transparent !important;
}

.modal.show {
    display: block !important;
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1056 !important;
    position: relative;
}

.modal-content {
    z-index: 1057 !important;
    position: relative;
    background-color: #fff;
}

/* Ensure modal shows above everything including navbar and sidebars */
body.modal-open {
    overflow: hidden;
}

body.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Override any conflicting z-index from main layout - THIS IS THE KEY FIX */
body.modal-open .main,
body.modal-open main,
body.modal-open .navbar,
body.modal-open .navbar-vertical,
body.modal-open .navbar-top,
body.modal-open .content {
    z-index: auto !important;
}

/* Also ensure the main container doesn't create a new stacking context */
main.z-index-0 {
    isolation: auto !important;
}

/* Form Switch Custom Colors */
.form-check-input:checked {
    background-color: var(--zbeauty-primary);
    border-color: var(--zbeauty-primary);
}

.form-check-input:focus {
    border-color: var(--zbeauty-primary);
    box-shadow: 0 0 0 0.25rem rgba(233, 30, 99, 0.25);
}

/* Alert Custom Animations */
.alert {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Card Header Custom Style */
.card-header.bg-body-tertiary {
    border-bottom: 2px solid rgba(233, 30, 99, 0.1);
}

/* Input Group Custom */
.input-group-text {
    background-color: rgba(233, 30, 99, 0.05);
    border-color: #dee2e6;
    color: var(--zbeauty-dark);
}

/* Button Loading State */
.btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Table Image Cell */
.table td img {
    transition: transform 0.2s ease;
}

.table td .cursor-pointer:hover img {
    transform: scale(1.1);
}
