/**
 * Vehizo Frontend Customizer Styles
 * Modern, intuitive interface with live preview
 */

.vehizo-pro-customizer-wrapper {
    margin: -20px -20px 0 -2px;
    background: #f0f0f1;
    min-height: calc(100vh - 32px);
}

.vehizo-customizer-header {
    background: #ffffff;
    padding: 24px 32px;
    border-bottom: 1px solid #dcdcde;
}

.vehizo-customizer-header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
}

.vehizo-customizer-header .description {
    margin: 0;
    color: #646970;
    font-size: 14px;
}

/* Container Layout */
.vehizo-customizer-container {
    display: flex;
    height: calc(100vh - 152px);
    gap: 0;
}

/* Sidebar */
.vehizo-customizer-sidebar {
    width: 380px;
    background: #ffffff;
    border-right: 1px solid #dcdcde;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tabs */
.vehizo-customizer-tabs {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #dcdcde;
}

.vehizo-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f0f0f1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #646970;
    transition: all 0.2s ease;
    text-align: left;
}

.vehizo-tab-btn:hover {
    background: #f6f7f7;
    color: #1d2327;
}

.vehizo-tab-btn.active {
    background: #f6f7f7;
    color: #2271b1;
    border-left: 3px solid #2271b1;
}

.vehizo-tab-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Content */
.vehizo-customizer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.vehizo-tab-panel {
    display: none;
}

.vehizo-tab-panel.active {
    display: block;
}

.vehizo-tab-panel h3 {
    margin: 0 0 24px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

/* Setting Groups */
.vehizo-setting-group {
    margin-bottom: 28px;
}

.vehizo-setting-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

.vehizo-setting-group .description {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    color: #646970;
}

.vehizo-theme-sync button {
    margin-top: 8px;
}

.vehizo-setting-group input[type="text"],
.vehizo-setting-group input[type="number"],
.vehizo-setting-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.vehizo-setting-group input:focus,
.vehizo-setting-group select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Color Picker */
.vehizo-color-picker {
    max-width: 200px;
}

/* Range Slider */
.vehizo-setting-group input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 12px;
    vertical-align: middle;
}

.vehizo-range-value {
    display: inline-block;
    min-width: 48px;
    padding: 4px 8px;
    background: #f0f0f1;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
}

/* Radio Cards */
.vehizo-layout-options,
.vehizo-columns-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.vehizo-columns-options {
    grid-template-columns: repeat(3, 1fr);
}

.vehizo-radio-card {
    position: relative;
    cursor: pointer;
}

.vehizo-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.vehizo-radio-card .radio-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: #f6f7f7;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vehizo-radio-card.small .radio-card-content {
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
}

.vehizo-radio-card input[type="radio"]:checked + .radio-card-content {
    background: #f0f6fc;
    border-color: #2271b1;
    color: #2271b1;
}

.vehizo-radio-card .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

/* Switch */
.vehizo-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.vehizo-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vehizo-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dcdcde;
    transition: 0.3s;
    border-radius: 28px;
}

.vehizo-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.vehizo-switch input:checked + .vehizo-switch-slider {
    background-color: #2271b1;
}

.vehizo-switch input:checked + .vehizo-switch-slider:before {
    transform: translateX(20px);
}

/* Actions */
.vehizo-customizer-actions {
    padding: 20px 24px;
    border-top: 1px solid #dcdcde;
    background: #f6f7f7;
    display: flex;
    gap: 12px;
}

.vehizo-customizer-actions .button {
    flex: 1;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Preview */
.vehizo-customizer-preview {
    flex: 1;
    background: #f0f0f1;
    display: flex;
    flex-direction: column;
}

.vehizo-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #dcdcde;
}

.vehizo-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.vehizo-preview-device-switcher {
    display: flex;
    gap: 4px;
}

.device-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-btn:hover {
    background: #f6f7f7;
}

.device-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #ffffff;
}

.device-btn .dashicons {
    width: 20px;
    height: 20px;
}

/* Preview Frame */
.vehizo-preview-frame-wrapper {
    flex: 1;
    padding: 24px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#vehizo-preview-frame {
    height: 100%;
    min-height: 600px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: width 0.3s ease;
}

.vehizo-preview-frame-wrapper.desktop #vehizo-preview-frame {
    width: 100%;
}

.vehizo-preview-frame-wrapper.tablet #vehizo-preview-frame {
    width: 768px;
}

.vehizo-preview-frame-wrapper.mobile #vehizo-preview-frame {
    width: 375px;
}

/* Responsive */
@media (max-width: 1400px) {
    .vehizo-customizer-sidebar {
        width: 320px;
    }
}

@media (max-width: 1200px) {
    .vehizo-customizer-container {
        flex-direction: column;
    }

    .vehizo-customizer-sidebar {
        width: 100%;
        height: 400px;
        border-right: none;
        border-bottom: 1px solid #dcdcde;
    }

    .vehizo-customizer-preview {
        height: calc(100vh - 552px);
    }
}
