/**
 * zCustomization - Front Office Styles
 */

/* Container */
.zcusto-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.zcusto-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
}

/* Accordion Panels */
.zcusto-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.zcusto-panel {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.zcusto-panel:hover {
    border-color: #000;
}

.zcusto-panel.active {
    border-color: #000;
    box-shadow: 0 2px 12px rgba(201, 160, 80, 0.15);
}

.zcusto-panel.completed {
    border-color: #28a745;
}

/* Panel Header */
.zcusto-panel-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.2s ease;
}

.zcusto-panel-header:hover {
    background: #f5f5f5;
}

.zcusto-panel.active .zcusto-panel-header {
    background: linear-gradient(135deg, #000 0%, #000 100%);
    color: #fff;
}

.zcusto-panel-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    margin-right: 1rem;
    color: #000;
}

.zcusto-panel.active .zcusto-panel-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.zcusto-panel-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.zcusto-panel-name {
    font-weight: 600;
    font-size: 1rem;
}

.zcusto-panel-price {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.zcusto-panel.active .zcusto-panel-price {
    color: rgba(255,255,255,0.9);
}

.zcusto-panel-price.zcusto-free {
    color: #28a745;
}

.zcusto-panel.active .zcusto-panel-price.zcusto-free {
    color: #90EE90;
}

.zcusto-panel-toggle {
    margin-left: 1rem;
}

.zcusto-panel-toggle .material-icons {
    transition: transform 0.3s ease;
}

.zcusto-panel.active .zcusto-panel-toggle .material-icons {
    transform: rotate(180deg);
}

.zcusto-panel-status {
    margin-left: 0.5rem;
}

.zcusto-status-icon {
    display: none;
}

.zcusto-panel.completed .zcusto-status-icon {
    display: block;
    color: #28a745;
}

.zcusto-panel.completed .zcusto-status-icon::before {
    content: 'check_circle';
}

/* Panel Content */
.zcusto-panel-content {
    padding: 1.5rem;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.zcusto-panel-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Form Groups */
.zcusto-form .form-group {
    margin-bottom: 1.25rem;
}

.zcusto-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    color: #333;
}

.zcusto-form .form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.625rem 0.875rem;
    transition: border-color 0.2s ease;
}

.zcusto-form .form-control:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(201, 160, 80, 0.15);
}

.zcusto-char-count {
    font-weight: 400;
    font-size: 0.85rem;
    color: #999;
}

/* Panel Actions */
.zcusto-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.zcusto-save-btn {
    background: linear-gradient(135deg, #000 0%, #000 100%);
    border: none;
    color: #fff;
    padding: 0.625rem 1.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zcusto-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 160, 80, 0.3);
}

.zcusto-clear-btn {
    color: #999;
}

/* Checkbox Labels */
.zcusto-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.zcusto-checkbox-label:hover {
    border-color: #000;
    background: #fafafa;
}

.zcusto-checkbox-label input:checked + .zcusto-checkbox-text {
    color: #000;
}

.zcusto-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    accent-color: #000;
}

.zcusto-checkbox-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zcusto-extra-price {
    font-size: 0.85rem;
    color: #666;
}

/* Carousels */
.zcusto-chocolate-carousel,
.zcusto-card-carousel,
.zcusto-picking-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.zcusto-chocolate-carousel::-webkit-scrollbar,
.zcusto-card-carousel::-webkit-scrollbar,
.zcusto-picking-carousel::-webkit-scrollbar {
    height: 6px;
}

.zcusto-chocolate-carousel::-webkit-scrollbar-track,
.zcusto-card-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.zcusto-chocolate-carousel::-webkit-scrollbar-thumb,
.zcusto-card-carousel::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 3px;
}

/* Chocolate Items */
.zcusto-chocolate-item {
    flex: 0 0 120px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.zcusto-chocolate-item:hover {
    border-color: #000;
}

.zcusto-chocolate-item[data-selected="true"] {
    border-color: #000;
    background: rgba(201, 160, 80, 0.1);
}

.zcusto-chocolate-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.zcusto-chocolate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zcusto-chocolate-name {
    font-size: 0.8rem;
    color: #333;
    display: block;
}

.zcusto-chocolate-check {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.zcusto-chocolate-item[data-selected="true"] .zcusto-chocolate-check {
    opacity: 1;
}

/* Selection Info */
.zcusto-selection-info {
    background: #f5f5f5;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.zcusto-selected-count {
    font-weight: 700;
    color: #000;
    font-size: 1.2rem;
}

/* Mode Selector */
.zcusto-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.zcusto-mode-option {
    flex: 1;
    cursor: pointer;
}

.zcusto-mode-option input {
    display: none;
}

.zcusto-mode-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.zcusto-mode-option input:checked + .zcusto-mode-label {
    border-color: #000;
    background: rgba(201, 160, 80, 0.1);
    color: #000;
}

/* Tray Swap */
.zcusto-tray-swap-entry {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 6px;
}

.zcusto-swap-select {
    flex: 1;
}

.zcusto-swap-arrow {
    padding-bottom: 0.5rem;
    color: #999;
}

.zcusto-add-swap {
    margin-top: 0.5rem;
}

/* Accessories Grid */
.zcusto-accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.zcusto-accessory-item {
    cursor: pointer;
}

.zcusto-accessory-item input {
    display: none;
}

.zcusto-accessory-content {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.zcusto-accessory-item:hover .zcusto-accessory-content {
    border-color: #000;
}

.zcusto-accessory-item input:checked + .zcusto-accessory-content {
    border-color: #000;
    background: rgba(201, 160, 80, 0.1);
}

.zcusto-accessory-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zcusto-accessory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zcusto-accessory-name {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.zcusto-accessory-price {
    font-size: 0.9rem;
    color: #000;
}

.zcusto-accessory-check {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.zcusto-accessory-item input:checked + .zcusto-accessory-content .zcusto-accessory-check {
    opacity: 1;
}

/* Upload Zone */
.zcusto-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    background: #fafafa;
}

.zcusto-upload-zone.dragover {
    border-color: #000;
    background: rgba(201, 160, 80, 0.1);
}

.zcusto-upload-placeholder .material-icons {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.zcusto-upload-preview {
    position: relative;
    display: inline-block;
}

.zcusto-preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
}

.zcusto-remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
}

/* Previews */
.zcusto-engraving-preview,
.zcusto-embroidery-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.zcusto-preview-box,
.zcusto-bag-preview {
    width: 200px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zcusto-preview-text,
.zcusto-embroidery-lines {
    color: #000;
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.zcusto-embroidery-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Wax Seal Preview */
.zcusto-wax-preview {
    margin-top: 1rem;
    text-align: center;
}

.zcusto-wax-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: radial-gradient(circle, #8B0000 0%, #5C0000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.zcusto-wax-initials {
    color: rgba(255,255,255,0.9);
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* Summary */
.zcusto-summary {
    margin-top: 2rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ebe0 100%);
    border-radius: 8px;
    border: 1px solid #e0d8c8;
}

.zcusto-summary h4 {
    margin-bottom: 1rem;
    color: #333;
}

.zcusto-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.zcusto-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0d8c8;
}

.zcusto-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    padding-top: 0.5rem;
}

.zcusto-total-price {
    color: #000;
    font-weight: 700;
}

/* Picking Mode */
.zcusto-picking-item {
    flex: 0 0 140px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.zcusto-picking-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.zcusto-picking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zcusto-picking-name {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.zcusto-picking-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.zcusto-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.zcusto-qty-btn:hover {
    border-color: #000;
    color: #000;
}

.zcusto-qty-input {
    width: 40px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.25rem;
}

/* Card Carousel */
.zcusto-card-option {
    flex: 0 0 120px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zcusto-card-option:hover {
    border-color: #000;
}

.zcusto-card-option.selected {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(201, 160, 80, 0.3);
}

.zcusto-card-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.zcusto-card-name {
    display: block;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    background: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
    .zcusto-container {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .zcusto-mode-selector {
        flex-direction: column;
    }
    
    .zcusto-tray-swap-entry {
        flex-wrap: wrap;
    }
    
    .zcusto-swap-select {
        flex: 0 0 100%;
    }
    
    .zcusto-swap-arrow {
        display: none;
    }
    
    .zcusto-accessories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
