/* W Slider Designer Styles - Revolution Slider inspired */

/* Force full width layout */
.fi-page-designer {
    max-width: 100% !important;
}

.fi-page-designer .fi-main {
    max-width: none !important;
}

.fi-page-designer .fi-section-content-ctn {
    max-width: none !important;
}

.fi-page-designer .fi-page {
    max-width: none !important;
}

.w-slider-designer {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
}

/* Canvas */
.w-slider-canvas {
    position: relative;
    background: #f5f5f5;
    background-image: 
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Layer element */
.w-layer-element {
    cursor: move;
    user-select: none;
    transition: box-shadow 0.15s ease;
}

.w-layer-element:hover {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.w-layer-element.selected {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 1) !important;
}

/* Resize handles */
.w-resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border: 2px solid rgba(99, 102, 241, 1);
    border-radius: 50%;
    z-index: 1000;
}

.w-resize-handle.nw {
    top: -4px;
    left: -4px;
    cursor: nw-resize;
}

.w-resize-handle.ne {
    top: -4px;
    right: -4px;
    cursor: ne-resize;
}

.w-resize-handle.sw {
    bottom: -4px;
    left: -4px;
    cursor: sw-resize;
}

.w-resize-handle.se {
    bottom: -4px;
    right: -4px;
    cursor: se-resize;
}

/* Layer panel */
.w-layer-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.w-layer-item {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.w-layer-item:hover {
    background: #f9fafb;
}

.w-layer-item.selected {
    background: #eef2ff;
    border-left: 3px solid rgba(99, 102, 241, 1);
}

.w-layer-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.w-layer-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.w-layer-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.w-layer-item:hover .w-layer-actions {
    opacity: 1;
}

/* Timeline */
.w-timeline {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.w-timeline-header {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.w-timeline-ruler {
    height: 30px;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.w-timeline-tick {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 8px;
    background: #d1d5db;
}

.w-timeline-tick-label {
    position: absolute;
    bottom: 12px;
    font-size: 10px;
    color: #6b7280;
    transform: translateX(-50%);
}

.w-timeline-track {
    display: flex;
    align-items: center;
    height: 48px;
    border-bottom: 1px solid #e5e7eb;
}

.w-timeline-track:last-child {
    border-bottom: none;
}

.w-timeline-track-label {
    width: 180px;
    flex-shrink: 0;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.w-timeline-track-content {
    flex: 1;
    position: relative;
    height: 100%;
    background: #fafafa;
    background-image: linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 40px 100%;
}

.w-keyframe {
    position: absolute;
    top: 8px;
    height: 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8));
    border: 1px solid rgba(99, 102, 241, 1);
    border-radius: 4px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
    user-select: none;
    transition: box-shadow 0.15s ease;
}

.w-keyframe:hover {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    z-index: 10;
}

.w-keyframe-handle {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    z-index: 2;
}

.w-keyframe-handle.left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.5), transparent);
}

.w-keyframe-handle.right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.5), transparent);
}

/* Properties panel */
.w-properties-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 16px;
}

.w-property-group {
    margin-bottom: 16px;
}

.w-property-group:last-child {
    margin-bottom: 0;
}

.w-property-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.w-property-field {
    margin-bottom: 12px;
}

.w-property-field:last-child {
    margin-bottom: 0;
}

.w-property-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.w-property-field input,
.w-property-field select,
.w-property-field textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.15s ease;
}

.w-property-field input:focus,
.w-property-field select:focus,
.w-property-field textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Toolbar */
.w-toolbar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.w-toolbar-group {
    display: flex;
    gap: 4px;
    padding-right: 12px;
    margin-right: 8px;
    border-right: 1px solid #e5e7eb;
}

.w-toolbar-group:last-child {
    border-right: none;
    margin-left: auto;
    padding-right: 0;
    margin-right: 0;
}

/* Buttons */
.w-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.w-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.w-btn:active {
    transform: translateY(1px);
}

.w-btn.primary {
    background: rgba(99, 102, 241, 1);
    border-color: rgba(99, 102, 241, 1);
    color: white;
}

.w-btn.primary:hover {
    background: rgba(79, 70, 229, 1);
    border-color: rgba(79, 70, 229, 1);
}

.w-btn.success {
    background: rgba(34, 197, 94, 1);
    border-color: rgba(34, 197, 94, 1);
    color: white;
}

.w-btn.success:hover {
    background: rgba(22, 163, 74, 1);
    border-color: rgba(22, 163, 74, 1);
}

.w-btn.danger {
    background: rgba(239, 68, 68, 1);
    border-color: rgba(239, 68, 68, 1);
    color: white;
}

.w-btn.danger:hover {
    background: rgba(220, 38, 38, 1);
    border-color: rgba(220, 38, 38, 1);
}

.w-btn.sm {
    padding: 4px 8px;
    font-size: 12px;
}

.w-btn.xs {
    padding: 2px 6px;
    font-size: 11px;
}

/* Icons */
.w-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Scrollbar */
.w-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.w-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.w-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.w-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.2s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .w-timeline-track-label {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .w-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .w-toolbar-group {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
}
