/* 
 * style.css - Main CSS styles for Deck Lab
 * This file should be placed in assets/css/style.css
 */

:root {
    --primary-color: #002766;
    --secondary-color: #1890ff;
    --accent-color: #0099ff;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --text-color: #333;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

/* Sidebar Styles */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#sidebar.active {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
    text-align: center;
}

#sidebar.active .sidebar-header h3, 
#sidebar.active .sidebar-footer span,
#sidebar.active .components span {
    display: none;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #001a4d;
}

#sidebar ul.components {
    padding: 20px 0;
    flex-grow: 1;
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 10px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    background: var(--secondary-color);
}

#sidebar.active ul li a {
    padding: 15px 10px;
    text-align: center;
    font-size: 0.9em;
}

#sidebar.active ul li a i {
    margin-right: 0;
    display: block;
    font-size: 1.5em;
    margin-bottom: 5px;
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--secondary-color);
}

#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.content-area {
    flex-grow: 1;
    padding: 20px;
}

/* Logo Styles */
.logo-container {
    text-align: center;
}

.logo {
    max-width: 180px;
    height: auto;
}

#sidebar.active .logo {
    max-width: 50px;
}

/* Navbar Styles */
.navbar {
    padding: 15px 10px;
    border-bottom: 1px solid #ddd;
}

/* Card Styles */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #001a4d;
    border-color: #001a4d;
}

.btn-info {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-info:hover {
    background-color: #0076cc;
    border-color: #0076cc;
    color: white;
}

/* File Card Styles */
.file-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.file-card .card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
}

.file-card .card-body {
    padding: 15px;
}

.file-card .file-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.tag-badge, .category-badge {
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

/* Presentation Builder Styles */
.slide-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    cursor: move;
    position: relative;
}

.slide-item .slide-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-weight: bold;
}

.slide-item .file-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.slide-item .remove-slide {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: red;
    cursor: pointer;
}

.slide-item.sortable-ghost {
    opacity: 0.5;
    background: #c8ebfb;
}

/* Login Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

/* Company Logo Styles */
.company-container {
    display: flex;
    align-items: center;
}

.company-logo {
    max-height: 40px;
    max-width: 150px;
}

.company-name {
    font-weight: bold;
    font-size: 1.2rem;
}

/* Footer Styles */
.footer {
    padding: 15px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    #sidebar {
        min-width: var(--sidebar-collapsed-width);
        max-width: var(--sidebar-collapsed-width);
        text-align: center;
    }
    
    #sidebar .sidebar-header h3, 
    #sidebar .sidebar-footer span,
    #sidebar .components span {
        display: none;
    }
    
    #sidebar ul li a {
        padding: 15px 10px;
        text-align: center;
        font-size: 0.9em;
    }
    
    #sidebar ul li a i {
        margin-right: 0;
        display: block;
        font-size: 1.5em;
        margin-bottom: 5px;
    }
}

/* Dashboard Stats Cards */
.stats-card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    margin-bottom: 20px;
}

.stats-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.stats-card .number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stats-card .label {
    font-size: 1.2rem;
    color: #666;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

/* Email stats */
.email-stat {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.email-stat .value {
    font-size: 2rem;
    font-weight: bold;
}

.email-stat.delivered {
    background-color: #e3f2fd;
}

.email-stat.opened {
    background-color: #e8f5e9;
}

.email-stat.clicked {
    background-color: #ede7f6;
}

/* Table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: normal;
    text-align: left;
}

.data-table tbody tr:hover {
    background-color: #f5f5f5;
}

.data-table .actions {
    white-space: nowrap;
}

/* Select2 custom styling */
.select2-container--default .select2-selection--multiple {
    border-color: #ced4da;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(24, 144, 255, 0.25);
}

/* Flash messages */
.alert-dismissible {
    position: relative;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1.25rem;
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* User profile */
.profile-card {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: block;
    background-color: var(--primary-color);
    color: white;
    font-size: 2.5rem;
    line-height: 100px;
    text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 5px 0;
}

.sidebar-footer a:hover {
    color: var(--secondary-color);
}

.sidebar-footer .user-info {
    margin-bottom: 10px;
}

.sidebar-footer .logout {
    color: #ff8080;
}

.sidebar-footer .logout:hover {
    color: #ff4040;
}

.thumbnail-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}

.thumbnail-container img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.file-card .card-body {
    display: flex;
    flex-direction: column;
}

.file-card .file-icon {
    font-size: 5rem;
    color: var(--primary-color);
}
.detail-thumbnail-container {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.detail-thumbnail-container img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Style for related file thumbnails */
.list-group-item .img-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: contain;
}