/* Pinshape Flask - Components Styles */

/* Card Components */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Clickable areas within cards */
.card .clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.card .clickable:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Prevent text selection on clickable elements */
.card .clickable {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Designer Widget Styles */
.designer-widget {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.designer-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.designer-widget .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
}

.designer-widget h5 {
    margin-bottom: 0.5rem;
    color: var(--pinshape-dark);
}

/* Designer Widget on Item Detail Page */
.designer-info {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.designer-info .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.designer-info h6 {
    margin-bottom: 0.25rem;
    color: var(--pinshape-dark);
    font-weight: 600;
}

.designer-info .text-muted {
    font-size: 0.9rem;
}

.designer-info .btn {
    margin-top: 0.75rem;
}

/* Form validation styles - extracted from inline styles */
.form-status-container {
    min-height: 1.25rem;
}

.form-error-details {
    min-height: 1.25rem;
    display: none;
}

.form-feedback-hidden {
    display: none;
}

.password-strength-hidden {
    display: none;
}

.password-strength-progress {
    height: 4px;
}

.password-strength-bar-empty {
    width: 0%;
}

/* License icon styles - extracted from inline styles */
.license-icon {
    height: 18px; /* Default height */
}

.license-icon-with-margin {
    height: 18px;
    margin-right: 2px;
}

.license-icon-custom-height {
    /* Dynamic height will be set via CSS custom property */
    height: var(--icon-height, 18px);
}

.license-icon-custom-with-margin {
    height: var(--icon-height, 18px);
    margin-right: 2px;
}

/* Dropdown and layout styles - extracted from inline styles */
.filters-dropdown-menu {
    min-width: 320px;
}

.price-range-section-hidden {
    display: none;
}

.price-range-section-visible {
    display: block;
}

.grid-layout-form {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 1rem;
}

/* Filter Dropdown Styles */
#filtersDropdown {
    position: relative;
}

#filtersDropdown .badge {
    font-size: 0.7rem;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1050;
}

/* Ensure the filters dropdown container has maximum z-index */
.filters-dropdown-container {
    position: relative !important;
    z-index: 9999 !important;
}

.filters-dropdown-container .dropdown-menu {
    z-index: 10000 !important;
    position: absolute !important;
}

/* Target the specific filters card directly */
#filters-card {
    position: relative !important;
    z-index: 9997 !important;
}

#filters-card .filters-dropdown-container {
    position: relative !important;
    z-index: 10001 !important;
}

#filters-card .dropdown-menu {
    z-index: 10002 !important;
    position: absolute !important;
}

/* User Navigation Dropdown Z-Index Fix - Similar to filters dropdown issue */
/* Z-Index Hierarchy: Bootstrap modals (1050) > Dropdown menus (10007) > Dropdown elements (10004-10006) > Filters (10002) > Navbar base (1030) > Main content (auto) */
/* This ensures proper layering and prevents click interception issues */

/* Target the navbar itself */
.navbar {
    position: relative !important;
    z-index: 1030 !important; /* Base navbar level - above main content but below dropdowns */
}

/* Target the navigation container */
.navbar-nav {
    position: relative !important;
    z-index: 10004 !important; /* Navigation container - above navbar base */
}

/* Target the dropdown container */
.navbar-nav .nav-item.dropdown {
    position: relative !important;
    z-index: 10005 !important; /* Dropdown container - above navigation container */
}

/* Target the dropdown toggle button */
#navbarDropdown {
    position: relative !important;
    z-index: 10006 !important; /* Dropdown toggle button - above dropdown container */
}

/* Target the dropdown menu itself with maximum z-index */
.navbar-nav .nav-item.dropdown .dropdown-menu {
    z-index: 10007 !important; /* Dropdown menu - highest priority to appear above all other elements */
    position: absolute !important;
}

/* Target dropdown items specifically */
.navbar-nav .dropdown-menu .dropdown-item {
    position: relative !important;
    z-index: 10008 !important; /* Individual dropdown items - ensures proper interaction within dropdown menu */
}

/* License dropdown width to fit content naturally */
.license-dropdown-full-width {
    width: auto !important;
    min-width: 200px !important;
    box-sizing: border-box;
}

/* Compact form controls for filters and sort */
.compact-select {
    width: auto !important;
    min-width: 160px !important;
}

/* Keep dropdown open when interacting with filters */
.dropdown-menu .form-check-input,
.dropdown-menu .form-select,
.dropdown-menu .form-control {
    cursor: pointer;
}

/* Apply button transitions */
.dropdown-menu button[type="submit"] {
    transition: all 0.2s ease;
}

.dropdown-menu button[type="submit"].btn-success {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.dropdown-header {
    font-weight: 600;
    color: var(--pinshape-dark);
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
}

.form-control-sm, .form-select-sm {
    font-size: 0.85rem;
}

.input-group-sm .input-group-text {
    font-size: 0.85rem;
}

/* Category Dropdown Integration */
.category-dropdown {
    border: 2px solid #e9ecef;
    background-color: white;
    font-size: 1.25rem;
    font-weight: 500;
    padding: 0.375rem 2.5rem 0.375rem 0.75rem;
    min-width: 160px;
    color: var(--pinshape-primary);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.category-dropdown:focus {
    border-color: var(--pinshape-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.category-dropdown:hover {
    border-color: var(--pinshape-primary);
}

/* Hybrid category dropdown - large text when closed, compact options when open */
.category-dropdown-hybrid option {
    font-size: 0.875rem !important;
    font-weight: normal !important;
    padding: 0.25rem 0.5rem !important;
    color: #000000 !important;
}

/* License dropdown tooltips */
.license-tooltip {
    position: relative;
    display: inline-block;
}

.license-tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    line-height: 1.4;
}

.license-tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.license-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Responsive adjustments for filter dropdown */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 300px !important;
        left: 0 !important;
        right: auto !important;
    }
    
    .dropdown-menu-end {
        left: 0 !important;
        right: auto !important;
    }
    
    /* Stack columns on mobile */
    .dropdown-menu .row .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .designer-widget {
        padding: 1rem;
    }
    
    .designer-widget .avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 0.75rem;
    }
    
    .designer-info {
        padding: 1rem;
    }
    
    .designer-info .avatar {
        width: 50px;
        height: 50px;
    }
    
    .grid-layout-form {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
} 