/* Catalog XDesigner CSS */
#xdesigner-app {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#xdesigner-view-tabs {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 6px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

#xdesigner-view-tabs button {
    background: transparent;
    border: none;
    padding: 6px 16px;
    margin: 0 4px;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    transition: all 0.2s ease;
    outline: none;
}

#xdesigner-view-tabs button:hover {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.05);
}

#xdesigner-view-tabs button.active {
    background: #4a4a8c;
    color: #fff;
    box-shadow: 0 2px 6px rgba(74, 74, 140, 0.3);
}

#xdesigner-main {
    display: flex;
    min-height: 600px;
}

#xdesigner-canvas-wrap {
    flex: 2;
    background: #f1f1f1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #ddd;
    overflow: hidden;
    position: relative;
}

#xdesigner-svg-canvas {
    width: 600px;
    height: 600px;
    max-width: 100%;
    max-height: 100%;
}

#xdesigner-controls-panel {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 600px;
}

.xd-control-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.xd-control-group h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.xd-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.xd-swatch {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    outline: none;
    transition: transform 0.1s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.xd-swatch:hover {
    transform: scale(1.05);
}

.xd-swatch.active {
    border: 2px solid #000;
    transform: scale(1.05);
}

/* Accordion Styles matching Clothoo */
.xd-accordion {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.xd-accordion-item {
    border-bottom: 1px solid #e2e8f0;
}
.xd-accordion-item:last-child {
    border-bottom: none;
}

.xd-accordion-header {
    background: #f8fafc;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.xd-accordion-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.xd-accordion-header .xd-icon {
    font-size: 18px;
    font-weight: bold;
    color: #64748b;
}

.xd-accordion-item.active .xd-accordion-header {
    background: #4a4a8c;
}

.xd-accordion-item.active .xd-accordion-header h4,
.xd-accordion-item.active .xd-accordion-header .xd-icon {
    color: #fff;
}

.xd-accordion-body {
    display: none;
    padding: 20px;
    background: #fff;
}

/* Sub-accordions for Add Colors */
.xd-sub-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 10px;
}
.xd-sub-accordion-header {
    background: #f8fafc;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #4a4a8c;
    font-weight: 600;
}
.xd-sub-accordion-body {
    display: none;
    padding: 15px;
    background: #f1f5f9;
}

.xd-control-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    outline: none;
}

#xdesigner-bottom-bar {
    background: #f8f8f8;
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
}

.xd-zone-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.xd-zone-btn:hover {
    background: #f0f0f0;
}

.xd-zone-btn.configured {
    border-color: #28a745;
    color: #28a745;
}

/* Customizer Zone Personalization Modal Overlay */
.xd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.xd-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    animation: xd-modal-anim 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes xd-modal-anim {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.xd-modal-header {
    background: #f8fafc;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xd-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.xd-modal-close {
    font-size: 24px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
}

.xd-modal-close:hover {
    color: #0f172a;
}

.xd-modal-body {
    padding: 24px;
}

.xd-modal-field {
    margin-bottom: 20px;
}

.xd-modal-field:last-child {
    margin-bottom: 0;
}

.xd-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.xd-modal-field input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.xd-modal-field input[type="text"]:focus {
    border-color: #4a4a8c;
    box-shadow: 0 0 0 3px rgba(74, 74, 140, 0.15);
}

.xd-modal-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.15s ease;
    outline: none;
}

.xd-modal-field select:focus {
    border-color: #4a4a8c;
}

.xd-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    max-height: 140px;
    overflow-y: auto;
}

.xd-color-option {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.xd-color-option:hover {
    transform: scale(1.1);
}

.xd-color-option.active {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #4a4a8c;
    transform: scale(1.1);
}

.xd-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.xd-modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.xd-modal-footer .btn-default {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #475569;
}

.xd-modal-footer .btn-default:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.xd-modal-footer .btn-primary {
    background: #4a4a8c;
    color: #ffffff;
}

.xd-modal-footer .btn-primary:hover {
    background: #3b3b73;
}

.xd-modal-footer .btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.xd-modal-footer .btn-danger:hover {
    background: #dc2626;
}

/* Customizer Zone Personalization Tabs & Option Grids */
.xd-tab-btn:hover {
    color: #4a4a8c !important;
}

.xd-tab-btn.active {
    color: #4a4a8c !important;
    border-bottom-color: #4a4a8c !important;
}

.xd-symbol-option:hover {
    border-color: #4a4a8c !important;
}

.xd-symbol-option.active {
    border-color: #4a4a8c !important;
    box-shadow: 0 0 0 2px rgba(74, 74, 140, 0.15);
    background: #f1f5f9 !important;
}
