
/* Dashboard Widget Carousel Modal Styles */

/* Override modal width for carousel */
#addWidgetModal .modal-content {
    max-width: 95vw;
    width: 1200px;
    background: #FAFAFA;
}

/* Override grid layout for carousel */
.available-widgets {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    padding: 10px 4px 30px 4px; /* Bottom padding for scrollbar */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--border-light);
}

.available-widgets::-webkit-scrollbar {
    height: 8px;
}

.available-widgets::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}

.available-widgets::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Widget Option Card */
.widget-option {
    flex: 0 0 320px; /* Fixed width for cards */
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0; /* Reset padding */
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #FFFFFF;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: 480px; /* Increased height for buttons */
}

.widget-option:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

/* Preview Area */
.widget-preview-container {
    width: 100%;
    height: 240px;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.widget-preview {
    width: 80%;
    height: auto;
    aspect-ratio: 16/9;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    padding: 12px;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.widget-option:hover .widget-preview {
    transform: scale(1.05);
}

/* Mockup Styles for Previews */
.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.preview-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.preview-title {
    height: 8px;
    width: 60%;
    background: #E2E8F0;
    border-radius: 4px;
}

.preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-line {
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    width: 100%;
}

.preview-line.short { width: 70%; }
.preview-line.medium { width: 85%; }

/* Widget Info Section */
.widget-option-info {
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.widget-option-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.widget-option-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Add Button */
.widget-add-btn {
    margin-top: auto;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.widget-option:hover .widget-add-btn {
    background: var(--primary);
    color: white;
}

/* Size Actions */
.widget-size-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    width: 100%;
    padding-bottom: 24px;
}

.btn-add-widget {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-add-widget:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.no-widgets-message {
    width: 100%;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Remove the old ::before plus icon */
.widget-option::before {
    display: none;
}

/* Modal Body Adjustment */
.modal-body {
    padding: 40px 0; /* Remove side padding to allow full width scroll */
}

.available-widgets {
    padding-left: 40px; /* Add padding to start of scroll */
    padding-right: 40px;
}
