/* Smart Show - Component Styles */

/* User Menu & Avatar */
.user-menu {
    position: relative;
    margin-left: 1rem;
    z-index: 10001;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--sage-light);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: var(--sage-primary);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    min-width: 250px;
    padding: 1rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10001;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.user-avatar-lg {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--sage-light);
}

.user-name {
    font-weight: 600;
    color: var(--sage-dark);
    font-size: 1.1rem;
}

.user-email {
    color: var(--sage-secondary);
    font-size: 0.9rem;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--sage-dark);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.dropdown-btn:hover {
    background: var(--sage-light);
}

/* Notifications removed */

/* File Manager */
.file-upload-area {
    margin-bottom: 2rem;
}

.upload-zone {
    border: 2px dashed var(--sage-primary);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--sage-dark);
    background: var(--sage-lighter);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--sage-primary);
    margin-bottom: 1rem;
}

.upload-zone h3 {
    color: var(--sage-dark);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--sage-secondary);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--sage-primary);
    transform: translateX(5px);
}

.file-item i {
    font-size: 1rem;
    color: var(--white);
}

/* File Type Icons */
.file-type-icon {
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.file-type-icon.pdf {
  color: #d32f2f;
}

.file-type-icon.pptx {
  color: #d84315;
}

.file-type-icon.video {
  color: #1976d2;
}

.file-type-icon.default {
  color: #666;
}

.presentation-title {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.clickable-file {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.clickable-file:hover {
  transform: scale(1.1);
}

.clickable-title {
  cursor: pointer;
  transition: color 0.2s ease;
}

.clickable-title:hover {
  color: var(--sage-primary);
  text-decoration: underline;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 600;
    color: var(--sage-dark);
}

.file-size {
    font-size: 0.9rem;
    color: var(--sage-secondary);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-btn {
    background: var(--sage-primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-btn:hover {
    background: var(--sage-dark);
}

/* Language Selector */
.language-selector {
    position: relative;
    margin-left: 1rem;
}

.language-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--sage-dark);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.language-btn:hover {
    background: var(--sage-light);
    color: var(--sage-primary);
}

.language-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.language-btn.active i {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    min-width: 180px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10001;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--sage-dark);
    font-size: 0.95rem;
}

.language-option:hover {
    background: var(--sage-light);
    color: var(--sage-primary);
}

.language-option.active {
    background: var(--sage-primary);
    color: var(--white);
}

.language-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.language-flag.en {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjE1IiBmaWxsPSIjMDEyMTY5Ii8+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIzIiB5PSIzIiBmaWxsPSIjRkZGRkZGIi8+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIzIiB5PSI5IiBmaWxsPSIjRkZGRkZGIi8+CjxyZWN0IHdpZHRoPSI4IiBoZWlnaHQ9IjE1IiBmaWxsPSIjRkYwMDAwIi8+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIxLjUiIHk9IjYuNzUiIGZpbGw9IiNGRjAwMDAiLz4KPC9zdmc+');
}

.language-flag.es {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjE1IiBmaWxsPSIjQ0MwMDAwIi8+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSI1IiB5PSI1IiBmaWxsPSIjRkZGRkZGIi8+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSI1IiB5PSIxMCIgZmlsbD0iI0ZGRkZGRiIvPgo8L3N2Zz4=');
}

.language-flag.fr {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjYuNjciIGhlaWdodD0iMTUiIGZpbGw9IiMwMDAwOTQiLz4KPHJlY3Qgd2lkdGg9IjYuNjciIGhlaWdodD0iMTUiIHg9IjYuNjciIGZpbGw9IiNGRkZGRkYiLz4KPHJlY3Qgd2lkdGg9IjYuNjciIGhlaWdodD0iMTUiIHg9IjEzLjMzIiBmaWxsPSIjRkYwMDAwIi8+Cjwvc3ZnPg==');
}

.language-name {
    font-weight: 500;
}

.language-code {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: auto;
}

/* Dark Mode Toggle */
#darkModeBtn {
    position: relative;
}

#darkModeBtn.active {
    background: var(--sage-primary);
    color: var(--white);
}

/* Refresh Button */
.refresh-btn {
    background: var(--sage-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: var(--sage-dark);
    transform: rotate(180deg);
}

/* Action buttons container */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Responsive adjustments for action buttons */
@media (max-width: 1200px) {
    .action-btn-large .btn-text {
        display: none;
    }
    
    .action-btn-large {
        min-width: 40px;
        padding: 0.75rem !important;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .action-btn-large .btn-text {
        display: block;
    }
}

/* Layout Settings Styles */
.sidebar-position-controls-settings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.sidebar-position-btn-settings {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-position-btn-settings:hover {
    background: var(--sage-lighter);
    border-color: var(--sage-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar-position-btn-settings.active {
    background: var(--sage-primary);
    border-color: var(--sage-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.sidebar-position-btn-settings i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.sidebar-position-btn-settings span {
    font-weight: 600;
}

/* Dark mode support for layout controls */
body.dark-mode .sidebar-position-btn-settings {
    background: var(--gray-800);
    border-color: var(--gray-700);
    color: var(--gray-200);
}

body.dark-mode .sidebar-position-btn-settings:hover {
    background: var(--gray-700);
    border-color: var(--sage-primary);
}

body.dark-mode .sidebar-position-btn-settings.active {
    background: var(--sage-primary);
    border-color: var(--sage-primary);
    color: white;
}

/* Responsive styles for sidebar position controls */
@media (max-width: 768px) {
    .sidebar-position-controls-settings {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        margin-top: 0.4rem;
    }
    
    .sidebar-position-btn-settings {
        padding: 0.8rem;
        border-radius: 10px;
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    
    .sidebar-position-btn-settings i {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }
    
    .sidebar-position-btn-settings span {
        font-weight: 500;
    }
}

@media (max-width: 600px) {
    .sidebar-position-controls-settings {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-top: 0.3rem;
    }
    
    .sidebar-position-btn-settings {
        padding: 0.6rem;
        border-radius: 8px;
        font-size: 0.75rem;
        gap: 0.3rem;
    }
    
    .sidebar-position-btn-settings i {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }
    
    .sidebar-position-btn-settings span {
        font-weight: 500;
    }
}

@media (max-width: 480px) {
    .sidebar-position-controls-settings {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
        margin-top: 0.25rem;
    }
    
    .sidebar-position-btn-settings {
        padding: 0.5rem;
        border-radius: 6px;
        font-size: 0.7rem;
        gap: 0.25rem;
    }
    
    .sidebar-position-btn-settings i {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }
    
    .sidebar-position-btn-settings span {
        font-weight: 500;
    }
}

@media (max-width: 360px) {
    .sidebar-position-controls-settings {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
        margin-top: 0.2rem;
    }
    
    .sidebar-position-btn-settings {
        padding: 0.4rem;
        border-radius: 4px;
        font-size: 0.65rem;
        gap: 0.2rem;
    }
    
    .sidebar-position-btn-settings i {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }
    
    .sidebar-position-btn-settings span {
        font-weight: 500;
    }
}

/* Touch device optimizations for sidebar position controls */
@media (hover: none) and (pointer: coarse) {
    .sidebar-position-btn-settings {
        min-height: 44px;
        min-width: 44px;
    }
    
    .sidebar-position-btn-settings:hover {
        transform: none;
        background: var(--gray-50);
        border-color: var(--gray-200);
    }
    
    .sidebar-position-btn-settings:active {
        background: var(--sage-primary);
        border-color: var(--sage-primary);
        color: white;
        transform: scale(0.98);
    }
    
    .sidebar-position-btn-settings.active:hover {
        background: var(--sage-primary);
        border-color: var(--sage-primary);
        color: white;
    }
}

/* Landscape orientation adjustments for sidebar position controls */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar-position-controls-settings {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
        margin-top: 0.3rem;
    }
    
    .sidebar-position-btn-settings {
        padding: 0.4rem;
        border-radius: 6px;
        font-size: 0.7rem;
        gap: 0.2rem;
    }
    
    .sidebar-position-btn-settings i {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }
    
    .sidebar-position-btn-settings span {
        font-weight: 500;
    }
}

/* Focus management for accessibility */
.sidebar-position-btn-settings:focus-visible {
    outline: 2px solid var(--sage-primary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar-position-btn-settings {
        transition: none;
    }
    
    .sidebar-position-btn-settings:hover,
    .sidebar-position-btn-settings:active {
        transform: none;
    }
}

/* Responsive adjustments for components */
@media (max-width: 900px) {
    .user-dropdown {
        right: -50px;
        min-width: 200px;
    }
    
    .language-selector {
        margin-left: 0.5rem;
    }
    
    .language-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .language-dropdown {
        right: -50px;
        min-width: 160px;
    }
    
    .notifications-panel {
        width: 100vw;
        right: -100vw;
        max-width: 400px;
    }
}

@media (max-width: 600px) {
    .user-menu {
        margin-left: 0.5rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .language-btn .language-name {
        display: none;
    }
    
    .language-btn {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
    
    .language-dropdown {
        right: -30px;
        min-width: 140px;
    }
    
    .notifications-panel {
        width: 100vw;
        right: -100vw;
        max-width: 350px;
    }
    
    .nav-brand span {
        display: none;
    }
}

/* Mobile Menu Integration */
@media (max-width: 1023px) {
    .user-menu,
    .language-selector,
    .nav-btn:not(.mobile-menu-toggle) {
        display: none !important;
    }
    
    .mobile-menu .user-menu,
    .mobile-menu .language-selector {
        display: block !important;
    }
    
    .mobile-menu .user-menu {
        margin: 0;
        width: 100%;
    }
    
    .mobile-menu .user-avatar {
        width: 50px;
        height: 50px;
    }
    
    .mobile-menu .language-selector {
        margin: 0;
        width: 100%;
    }
    
    .mobile-menu .language-btn {
        width: 100%;
        justify-content: space-between;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .mobile-menu .language-btn .language-name {
        display: block;
    }
    
    .mobile-menu .language-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        transform: none;
        opacity: 1;
        display: none;
        box-shadow: none;
        border: 1px solid var(--glass-border);
    }
    
    .mobile-menu .language-dropdown.show {
        display: block;
    }
    
    .mobile-menu .user-dropdown {
        position: static; /* Remove absolute positioning */
        width: 100%;
        margin-top: 0.5rem;
        transform: none;
        opacity: 1;
        display: none;
        box-shadow: none;
        border: 1px solid var(--glass-border);
        left: 0; /* Align to left */
        right: auto; /* Remove right alignment */
    }
    
    .mobile-menu .user-dropdown.show {
        display: block;
    }
    
    .mobile-menu .notifications-panel {
        position: static;
        width: 100%;
        max-width: none;
        right: auto;
        transform: none;
        opacity: 1;
        display: none;
        box-shadow: none;
        border: 1px solid var(--glass-border);
        margin-top: 0.5rem;
    }
    
    .mobile-menu .notifications-panel.show {
        display: block;
    }
}

/* Extra Small Devices (phones, 480px and down) */
@media (max-width: 480px) {
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .language-btn {
        padding: 0.4rem;
        min-width: 36px;
        font-size: 0.8rem;
    }
    
    .language-dropdown {
        right: -20px;
        min-width: 120px;
    }
    
    .notifications-panel {
        max-width: 300px;
    }
    
    .notification-item {
        padding: 0.75rem;
    }
    
    .notification-title {
        font-size: 0.9rem;
    }
    
    .notification-message {
        font-size: 0.8rem;
    }
    
    .notification-time {
        font-size: 0.75rem;
    }
}

/* Small Devices (landscape phones, 481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .user-avatar {
        width: 38px;
        height: 38px;
    }
    
    .language-btn {
        padding: 0.5rem 0.6rem;
        min-width: 42px;
        font-size: 0.85rem;
    }
    
    .language-dropdown {
        right: -25px;
        min-width: 130px;
    }
    
    .notifications-panel {
        max-width: 320px;
    }
}

/* Medium Devices (tablets, 768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .language-btn {
        padding: 0.6rem 0.8rem;
        min-width: 45px;
        font-size: 0.9rem;
    }
    
    .language-dropdown {
        right: -30px;
        min-width: 150px;
    }
    
    .notifications-panel {
        max-width: 380px;
    }
}

/* Large Devices (desktops, 1024px to 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .user-avatar {
        width: 42px;
        height: 42px;
    }
    
    .language-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .language-dropdown {
        right: -40px;
        min-width: 170px;
    }
    
    .notifications-panel {
        max-width: 400px;
    }
}

/* Extra Large Devices (large desktops, 1440px and up) */
@media (min-width: 1440px) {
    .user-avatar {
        width: 45px;
        height: 45px;
    }
    
    .language-btn {
        padding: 0.75rem 1.2rem;
        font-size: 1rem;
    }
    
    .language-dropdown {
        right: -50px;
        min-width: 180px;
    }
    
    .notifications-panel {
        max-width: 450px;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .language-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .notifications-panel {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .user-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .language-flag {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .user-menu,
    .language-selector,
    .notifications-panel {
        transition: none;
    }
    
    .language-btn i {
        transition: none;
    }
    
    .notification-item {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .user-dropdown {
        background: rgba(45, 55, 72, 0.95);
        border-color: rgba(74, 85, 104, 0.3);
    }
    
    .language-dropdown {
        background: rgba(45, 55, 72, 0.95);
        border-color: rgba(74, 85, 104, 0.3);
    }
    
    .notifications-panel {
        background: rgba(45, 55, 72, 0.95);
        border-color: rgba(74, 85, 104, 0.3);
    }
}

/* Print Styles */
@media print {
    .user-menu,
    .language-selector,
    .notifications-panel {
        display: none;
    }
}
