﻿/* ===== QOP Dashboard Cuba Theme Customizations ===== */

/* Additional Cuba theme customizations for QOP Dashboard */
:root {
    --qop-primary: var(--theme-deafult, #7366ff);
    --qop-secondary: var(--theme-secondary, #f73164);
    --qop-success: #51bb25;
    --qop-warning: #ffb829;
    --qop-danger: #dc3545;
    --qop-info: #158df7;

    /* Theme body font color fallbacks */
    --theme-body-font-color: var(--body-font-color, #5c61f2);
    --light-bg: var(--light-background, #f6f7f9);
    --chart-border: var(--border-color, #ecf3fa);
}

/* Enhanced card hover effects */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Custom gradient backgrounds for hero section */
.hero-gradient {
    background: linear-gradient(135deg, var(--qop-primary) 0%, #764ba2 100%);
}

/* Enhanced statistics cards */
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Activity timeline enhancements */
.activity-item {
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(5px);
}

/* Progress bar animations */
.progress-bar {
    transition: width 1.5s ease-in-out;
}

/* Chart container styling */
.chart-container {
    position: relative;
    height: 300px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-gradient h1 {
        font-size: 2rem !important;
    }
    
    .hero-gradient p {
        font-size: 1rem !important;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Cuba theme badge enhancements */
.badge-light-primary {
    background-color: rgba(115, 102, 255, 0.1);
    color: var(--qop-primary);
}

.badge-light-success {
    background-color: rgba(81, 187, 37, 0.1);
    color: var(--qop-success);
}

.badge-light-warning {
    background-color: rgba(255, 184, 41, 0.1);
    color: var(--qop-warning);
}

.badge-light-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--qop-danger);
}

.badge-light-info {
    background-color: rgba(21, 141, 247, 0.1);
    color: var(--qop-info);
}

.badge-light-secondary {
    background-color: rgba(247, 49, 100, 0.1);
    color: var(--qop-secondary);
}

/* Background light colors for activity items */
.bg-light-primary {
    background-color: rgba(115, 102, 255, 0.1) !important;
}

/* Enhanced Product DataTable Styling */
#product-datatable {
    border-collapse: separate;
    border-spacing: 0;
}

#product-datatable thead th {
    background-color: var(--light-bg, #f6f7f9);
    border-bottom: 2px solid var(--chart-border, #ecf3fa);
    font-weight: 600;
    color: var(--theme-body-font-color);
    padding: 1rem 0.75rem;
}

#product-datatable tbody td {
    border-bottom: 1px solid var(--chart-border, #ecf3fa);
    vertical-align: middle;
    padding: 0.875rem 0.75rem;
}

#product-datatable tbody tr:hover {
    background-color: var(--light-background, rgba(242, 243, 247, 0.7));
    transition: background-color 0.3s ease;
}

/* Enhanced Action Buttons */
.action {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.action .btn {
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.action .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action .edit:hover {
    background-color: var(--qop-success);
    border-color: var(--qop-success);
    color: white;
}

.action .delete:hover {
    background-color: var(--qop-danger);
    border-color: var(--qop-danger);
    color: white;
}

/* Enhanced Filter Section */
.filter-section {
    background-color: var(--light-bg, #f8f9fa);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.input-group-text {
    background-color: var(--light-bg, #f6f7f9);
    border-color: var(--chart-border, #ecf3fa);
    color: var(--theme-body-font-color);
}

/* Enhanced Create Button */
.btn-air-primary {
    background: linear-gradient(135deg, var(--qop-primary) 0%, #5a52d5 100%);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(115, 102, 255, 0.3);
}

.btn-air-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(115, 102, 255, 0.4);
    background: linear-gradient(135deg, #5a52d5 0%, var(--qop-primary) 100%);
    color: white;
}

/* Enhanced Badge Styling */
.badge-light-info {
    background-color: rgba(21, 141, 247, 0.1);
    color: var(--qop-info);
    border: 1px solid rgba(21, 141, 247, 0.2);
}

.badge-light-primary {
    background-color: rgba(115, 102, 255, 0.1);
    color: var(--qop-primary);
    border: 1px solid rgba(115, 102, 255, 0.2);
}

/* Fade-in Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State Styling */
.empty-state {
    padding: 2rem;
    background-color: var(--light-bg, #f8f9fa);
    border-radius: 1rem;
    border: 2px dashed var(--chart-border, #ecf3fa);
    margin: 2rem auto;
    max-width: 500px;
}

.empty-state i {
    opacity: 0.6;
}

.empty-state h4 {
    font-weight: 600;
    color: var(--theme-body-font-color);
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Enhanced Form Styling for Create/Edit Pages */
.theme-form .form-control {
    border: 1px solid var(--chart-border, #ecf3fa);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.theme-form .form-control:focus {
    border-color: var(--qop-primary);
    box-shadow: 0 0 0 0.2rem rgba(115, 102, 255, 0.15);
}

.theme-form .form-select {
    border: 1px solid var(--chart-border, #ecf3fa);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.theme-form .input-group-text {
    background-color: var(--light-bg, #f6f7f9);
    border: 1px solid var(--chart-border, #ecf3fa);
    color: var(--qop-primary);
    font-weight: 500;
}

.theme-form .form-check-input:checked {
    background-color: var(--qop-success);
    border-color: var(--qop-success);
}

.theme-form .form-label {
    font-weight: 600;
    color: var(--theme-body-font-color);
    margin-bottom: 0.5rem;
}

/* Product Meta Information */
.product-meta {
    background: linear-gradient(135deg, rgba(115, 102, 255, 0.1) 0%, rgba(21, 141, 247, 0.1) 100%);
    border: 1px solid rgba(115, 102, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
}

/* Form Section Styling */
.form-section {
    background-color: var(--light-bg, #f8f9fa);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--chart-border, #ecf3fa);
}

.section-header {
    position: relative;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--theme-body-font-color);
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--qop-primary) 0%, transparent 100%);
    margin: 0.5rem 0;
}

/* Action Buttons Enhancement */
.action-buttons .btn {
    min-width: 150px;
    font-weight: 500;
}

/* Responsive Form Enhancements */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .action-buttons .btn {
        width: 100%;
        min-width: unset;
    }

    .cancel-actions {
        margin-top: 1rem;
        width: 100%;
    }

    .cancel-actions .btn {
        width: 100%;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
    }

    .product-meta {
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .form-section {
        padding: 1rem;
    }
}

/* Quill Rich Text Editor Cuba Integration */
.quill-wrapper {
    border: 1px solid var(--chart-border, #ecf3fa);
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quill-wrapper:focus-within {
    border-color: var(--qop-primary);
    box-shadow: 0 0 0 0.2rem rgba(115, 102, 255, 0.15);
}

.quill-wrapper .ql-toolbar {
    background: linear-gradient(135deg, var(--light-bg, #f6f7f9) 0%, #ffffff 100%);
    border: none;
    border-bottom: 1px solid var(--chart-border, #ecf3fa);
    padding: 0.75rem;
}

.quill-wrapper .ql-toolbar .ql-formats {
    margin-right: 1rem;
}

.quill-wrapper .ql-toolbar .ql-formats:last-child {
    margin-right: 0;
}

.quill-wrapper .ql-toolbar button {
    border-radius: 0.25rem;
    padding: 0.375rem;
    margin: 0 0.125rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quill-wrapper .ql-toolbar button:hover {
    background-color: var(--qop-primary);
    color: white;
    border-color: var(--qop-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(115, 102, 255, 0.3);
}

.quill-wrapper .ql-toolbar button.ql-active {
    background-color: var(--qop-primary);
    color: white;
    border-color: var(--qop-primary);
    box-shadow: 0 2px 4px rgba(115, 102, 255, 0.3);
}

.quill-wrapper .ql-toolbar .ql-picker {
    color: var(--theme-body-font-color);
}

.quill-wrapper .ql-toolbar .ql-picker-label {
    border-radius: 0.25rem;
    padding: 0.375rem 0.5rem;
    transition: all 0.2s ease;
}

.quill-wrapper .ql-toolbar .ql-picker-label:hover {
    background-color: var(--qop-primary);
    color: white;
}

.quill-wrapper .ql-container {
    border: none;
    font-family: inherit;
}

.quill-wrapper .ql-editor {
    min-height: 180px;
    padding: 1.25rem;
    line-height: 1.6;
    color: var(--theme-body-font-color);
    font-size: 0.875rem;
}

.quill-wrapper .ql-editor.ql-blank::before {
    color: #adb5bd;
    font-style: normal;
    left: 1.25rem;
    right: 1.25rem;
}

.quill-wrapper .ql-editor h1,
.quill-wrapper .ql-editor h2,
.quill-wrapper .ql-editor h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.quill-wrapper .ql-editor h1 {
    color: var(--qop-primary);
    font-size: 1.75rem;
}

.quill-wrapper .ql-editor h2 {
    color: var(--qop-secondary);
    font-size: 1.5rem;
}

.quill-wrapper .ql-editor h3 {
    color: var(--qop-info);
    font-size: 1.25rem;
}

.quill-wrapper .ql-editor a {
    color: var(--qop-primary);
    transition: color 0.2s ease;
}

.quill-wrapper .ql-editor a:hover {
    color: var(--qop-secondary);
}

.quill-wrapper .ql-editor ul,
.quill-wrapper .ql-editor ol {
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.quill-wrapper .ql-editor li {
    margin-bottom: 0.25rem;
}

.quill-wrapper .ql-editor strong {
    font-weight: 600;
}

.quill-wrapper .ql-editor em {
    font-style: italic;
}

.quill-wrapper .ql-editor u {
    text-decoration: underline;
}

/* Responsive Quill Enhancements */
@media (max-width: 768px) {
    .quill-wrapper .ql-toolbar {
        padding: 0.5rem;
    }

    .quill-wrapper .ql-toolbar .ql-formats {
        margin-right: 0.5rem;
    }

    .quill-wrapper .ql-toolbar button {
        padding: 0.25rem;
        margin: 0 0.0625rem;
    }

    .quill-wrapper .ql-editor {
        padding: 1rem;
        min-height: 150px;
    }

    .quill-wrapper .ql-editor.ql-blank::before {
        left: 1rem;
        right: 1rem;
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .action {
        flex-direction: column;
        gap: 0.125rem;
    }

    .action .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.375rem;
    }

    .card-header-right {
        margin-top: 0.5rem;
    }

    .filter-section {
        padding: 0.75rem;
    }

    .empty-state {
        padding: 1.5rem;
        margin: 1rem auto;
    }

    .empty-state i {
        font-size: 2.5rem !important;
    }

    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
}

.bg-light-success {
    background-color: rgba(81, 187, 37, 0.1) !important;
}

.bg-light-warning {
    background-color: rgba(255, 184, 41, 0.1) !important;
}

.bg-light-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-light-info {
    background-color: rgba(21, 141, 247, 0.1) !important;
}

.bg-light-secondary {
    background-color: rgba(247, 49, 100, 0.1) !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced table styling */
.table-responsive .table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-responsive .table th {
    background-color: var(--light-bg, #f6f7f9);
    border-bottom: 2px solid var(--chart-border, #ecf3fa);
    font-weight: 600;
}

.table-responsive .table td {
    border-bottom: 1px solid var(--chart-border, #ecf3fa);
    vertical-align: middle;
}

.table-responsive .table tbody tr:hover {
    background-color: var(--light-background, rgba(242, 243, 247, 0.7));
}

/* Product Details View Enhancements */
.details-section {
    background-color: var(--light-bg, #f8f9fa);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--chart-border, #ecf3fa);
    transition: all 0.3s ease;
}

.details-section:hover {
    box-shadow: 0 4px 12px rgba(115, 102, 255, 0.1);
}

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

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

.info-label {
    font-weight: 600;
    color: var(--qop-secondary);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.info-value {
    color: var(--theme-body-font-color);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Product Images Styling */
.product-images-section {
    background-color: var(--light-bg, #f8f9fa);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--chart-border, #ecf3fa);
}

.image-container {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(115, 102, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.image-overlay i {
    color: white;
    font-size: 2rem;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.image-container:hover .main-product-image {
    transform: scale(1.05);
}

.thumbnail-container {
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(115, 102, 255, 0.3);
}

.thumbnail-image {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-image:hover {
    border-color: var(--qop-primary);
}

/* Description Content Styling */
.description-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--chart-border, #ecf3fa);
    line-height: 1.6;
}

.description-content h1,
.description-content h2,
.description-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.description-content h1 {
    color: var(--qop-primary);
    font-size: 1.75rem;
}

.description-content h2 {
    color: var(--qop-secondary);
    font-size: 1.5rem;
}

.description-content h3 {
    color: var(--qop-info);
    font-size: 1.25rem;
}

.description-content a {
    color: var(--qop-primary);
}

.description-content ul,
.description-content ol {
    padding-left: 2rem;
}

/* Product Attributes Styling */
.attribute-group {
    margin-bottom: 2rem;
}

.attribute-group-title {
    color: var(--qop-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--chart-border, #ecf3fa);
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.attribute-item {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--chart-border, #ecf3fa);
    transition: all 0.3s ease;
}

.attribute-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(115, 102, 255, 0.15);
}

.attribute-card {
    padding: 1rem;
}

.attribute-name {
    font-weight: 600;
    color: var(--qop-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.attribute-value {
    color: var(--theme-body-font-color);
    font-size: 0.95rem;
}

.attribute-unit {
    color: var(--qop-info);
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* Action Buttons Styling */
.action-buttons-section .btn {
    min-width: 150px;
    font-weight: 500;
}

/* Product Details Responsive Design */
@media (max-width: 768px) {
    .details-section {
        padding: 1rem;
    }

    .main-product-image {
        height: 200px;
    }

    .attributes-grid {
        grid-template-columns: 1fr;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .primary-actions,
    .secondary-actions {
        width: 100%;
    }

    .primary-actions .btn,
    .secondary-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .product-meta {
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .card-header-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 1rem;
    }
}

/* Product Details Animation Effects */
.details-section,
.product-images-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
