/* =================================================
   COLLECTION COMPONENTS SHARED STYLES
   Estilos compartidos para componentes de colección
   (user-collection-header, user-platform-collection-header,
   user-accessory-collection-header, accessories/index, accessories/show)

   CSS Variables expected to be set inline:
   --user-header-gradient: User's custom header gradient
   --user-theme-gradient: User's custom theme gradient
   ================================================= */

/* ===== TÍTULO MODERNO ===== */
.modern-title-container {
    background: var(--user-header-gradient, linear-gradient(135deg, #667eea, #764ba2));
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.06);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.modern-title-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: subtle-pulse 4s ease-in-out infinite alternate;
}

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

.modern-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

/* ===== ACCIONES DEL TÍTULO ===== */
.title-actions {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.btn-back {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-back:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    opacity: 0.9;
}

/* ===== TABS HÍBRIDAS ===== */
.hybrid-tabs-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 0.3rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}

.hybrid-tabs {
    background: none !important;
    border: none !important;
    gap: 0.2rem;
}

.hybrid-tab {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #6c757d !important;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 0 !important;
    font-size: 0.95rem;
    outline: none !important;
    box-shadow: none !important;
}

.hybrid-tab:hover {
    color: #495057 !important;
    background: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    outline: none !important;
}

.hybrid-tab:focus {
    outline: none !important;
    box-shadow: none !important;
}

.hybrid-tab.active {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2)) !important;
    color: white !important;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-1px);
    border: none !important;
    font-weight: 600;
    outline: none !important;
}

/* ===== FILTROS MODERNOS ===== */
.modern-filters-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.modern-filters-container .form-control,
.modern-filters-container .form-select {
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    height: 38px;
}

.modern-filters-container .form-select {
    position: relative;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.modern-filters-container .form-control:focus,
.modern-filters-container .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.modern-filters-container .btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 38px;
    font-size: 0.9rem;
}

.modern-filters-container .btn-outline-primary {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2));
    border: 2px solid transparent;
    color: white;
}

.modern-filters-container .btn-outline-primary:hover {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2));
    border-color: transparent;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    opacity: 0.9;
}

.modern-filters-container .btn-outline-secondary {
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid rgba(108, 117, 125, 0.3);
    color: #6c757d;
}

.modern-filters-container .btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* ===== BOTONES PERSONALIZADOS DE FILTROS ===== */
.btn-filter-custom {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2)) !important;
    color: white !important;
    border: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    height: 38px;
    font-size: 0.9rem;
}

.btn-filter-custom:hover {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2)) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    opacity: 0.9;
}

.btn-filter-custom:focus {
    background: var(--user-theme-gradient, linear-gradient(135deg, #667eea, #764ba2)) !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.btn-clear-custom {
    background: rgba(108, 117, 125, 0.1) !important;
    border: 2px solid rgba(108, 117, 125, 0.3) !important;
    color: #6c757d !important;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-clear-custom:hover {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    text-decoration: none !important;
}

.btn-clear-custom:focus {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.2);
    text-decoration: none !important;
}

/* ===== FONT CONSISTENCY ===== */
.modern-header-font {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-weight: 600 !important;
}

/* ===== DARK MODE ===== */
body.dark-mode .hybrid-tabs-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
    border-color: #404040;
}

body.dark-mode .hybrid-tab {
    color: #999 !important;
}

body.dark-mode .hybrid-tab:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
}

body.dark-mode .hybrid-tab.active {
    color: white !important;
}

body.dark-mode .modern-filters-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
    border-color: #404040;
}

body.dark-mode .modern-filters-container .form-control,
body.dark-mode .modern-filters-container .form-select {
    background: rgba(58, 58, 58, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .modern-filters-container .form-control:focus,
body.dark-mode .modern-filters-container .form-select:focus {
    background: rgba(64, 64, 64, 0.95);
    border-color: #0d6efd;
    color: #e0e0e0;
}

body.dark-mode .modern-filters-container .form-control::placeholder {
    color: #888;
}

body.dark-mode .btn-clear-custom {
    background: rgba(80, 80, 80, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #bbb !important;
}

body.dark-mode .btn-clear-custom:hover {
    background: #505050 !important;
    border-color: #606060 !important;
    color: #fff !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .modern-title {
        font-size: 2rem;
    }

    .modern-title-container {
        padding: 1rem;
    }

    .title-actions {
        position: static;
        transform: none;
        display: flex;
        justify-content: center;
        margin-top: 1rem;
    }

    .modern-filters-container {
        padding: 0.25rem;
    }

    .hybrid-tab {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem;
    }

    .hybrid-tabs-container {
        padding: 0.25rem;
    }
}