/**
 * Easy Order - Grid-based bulk ordering styles
 */
 
/* Style images in a row */
.style-images-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.style-image-item {
    flex: 1 1 0;
    max-width: 33%;
    text-align: center;
}

.style-image-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.style-image-item p {
    margin-top: 8px;
    font-weight: 700;
    color: #333;
}
 
 

/* Container */
.easyorder-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}


.btn-copy-row {
    background-color: #5bc0de;  /* Light blue to differentiate from Add Another Design */
    color: #fff;
    margin-left: 10px;
}

.btn-copy-row:hover {
    background-color: #46b8da;
}


/* Header/Image Section */
.easyorder-image {
    text-align: center;
    margin-bottom: 30px;
}

.easyorder-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.easyorder-image .image-caption {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* Instructions */
.easyorder-instructions {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.easyorder-instructions h3 {
    margin-top: 0;
    color: #00a0dc;
}

.easyorder-instructions ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.easyorder-instructions li {
    margin-bottom: 8px;
}

.easyorder-instructions code {
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Symbol Charts - Collapsible Section */
.easyorder-symbols {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.symbols-toggle {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.symbols-toggle:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.toggle-icon {
    font-size: 12px;
    color: #00a0dc;
    transition: transform 0.2s;
}

.symbols-content {
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid #ddd;
}

.symbols-charts {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.symbol-chart {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: center;
}

.symbol-chart h4 {
    margin: 0 0 15px 0;
    color: #00a0dc;
    font-size: 18px;
}

.symbol-chart img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Grid Wrapper */
.easyorder-grid-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Grid Table */
.easyorder-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.easyorder-grid th,
.easyorder-grid td {
    padding: 10px 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.easyorder-grid thead th {
    background: #00a0dc;
    color: #fff;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.easyorder-grid tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.easyorder-grid tbody tr:hover {
    background: #eef7fb;
}

/* Column Widths */
.col-qty { width: 70px; }
.col-style { width: 100px; }
.col-size { width: 180px; }
.col-swatch { width: 38px !important; min-width: 38px; padding: 4px 2px !important; text-align: center; }
.col-upper { width: 130px; }
.col-sole { width: 130px; }
.col-strap { width: 130px; }
.col-left { width: 150px; }
.col-right { width: 150px; }
.col-unit { width: 80px; text-align: right; }
.col-ext { width: 90px; text-align: right; }
.col-action { width: 40px; text-align: center; }

/* Remove borders between color dropdown and swatch (swatch is now AFTER dropdown) */
.easyorder-grid th.col-upper,
.easyorder-grid td.col-upper,
.easyorder-grid th.col-sole,
.easyorder-grid td.col-sole,
.easyorder-grid th.col-strap,
.easyorder-grid td.col-strap {
    border-right: none !important;
}
.easyorder-grid th.col-swatch,
.easyorder-grid td.col-swatch {
    border-left: none !important;
}

/* Center color column headers over the combined dropdown + swatch area */
.easyorder-grid thead th.col-upper,
.easyorder-grid thead th.col-sole,
.easyorder-grid thead th.col-strap {
    text-align: right;
    padding-right: 0;
    padding-left: 8px;
}

/* Color swatches next to dropdowns */
.color-swatch {
    width: 32px;
    height: 32px;
    border: 1px solid #999;
    border-radius: 3px;
    background-color: #fff;
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

/* X pattern for empty/unselected swatch */
.color-swatch.empty::before,
.color-swatch.empty::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 2px;
    background-color: #ccc;
    top: 50%;
    left: 10%;
}
.color-swatch.empty::before {
    transform: rotate(45deg);
}
.color-swatch.empty::after {
    transform: rotate(-45deg);
}

.easyorder-grid thead th.col-swatch {
    background: #00a0dc;
    padding: 10px 2px;
}

/* Form Elements */
.easyorder-grid input[type="number"],
.easyorder-grid input[type="text"],
.easyorder-grid select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.easyorder-grid input[type="number"] {
    text-align: center;
}

.easyorder-grid select {
    background: #fff;
    cursor: pointer;
}

.easyorder-grid select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.easyorder-grid input:focus,
.easyorder-grid select:focus {
    outline: none;
    border-color: #00a0dc;
    box-shadow: 0 0 3px rgba(0,160,220,0.3);
}

/* Disabled text inputs */
.easyorder-grid input[type="text"]:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* Error state */
.easyorder-grid .error {
    border-color: #dc3545 !important;
    background-color: #fff0f0 !important;
}

/* Price displays */
.unit-price,
.ext-price {
    font-weight: 600;
    color: #333;
}

.ext-price {
    color: #00a0dc;
}

/* Remove button */
.btn-remove-row {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-remove-row:hover {
    background: #c82333;
}

/* Totals row */
.totals-row {
    background: #f0f0f0 !important;
    font-size: 16px;
}

.totals-row .text-right {
    text-align: right;
}

.grand-total {
    font-size: 20px;
    font-weight: 700;
    color: #00a0dc;
}

/* Action Buttons */
.easyorder-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.easyorder-actions .button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add-row {
    background: #6c757d;
    color: #fff;
}

.btn-add-row:hover {
    background: #5a6268;
}

.btn-add-cart {
    background: #00a0dc;
    color: #fff;
}

.btn-add-cart:hover {
    background: #0088c0;
}

/* Messages */
.easyorder-messages {
    max-width: 600px;
    margin: 0 auto;
}

.message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 1200px) {
    .easyorder-grid {
        font-size: 12px;
    }
    
    .easyorder-grid th,
    .easyorder-grid td {
        padding: 8px 5px;
    }
    
    .easyorder-grid input[type="number"],
    .easyorder-grid input[type="text"],
    .easyorder-grid select {
        padding: 6px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .easyorder-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .easyorder-actions .button {
        width: 100%;
    }
    
    /* Symbol charts stack on mobile */
    .symbols-charts {
        flex-direction: column;
    }
    
    .symbol-chart {
        max-width: 100%;
    }
    
    /* Stack columns on mobile */
    .easyorder-grid thead {
        display: none;
    }
    
    .easyorder-grid tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 2px solid #ddd;
        border-radius: 8px;
        padding: 15px;
    }
    
    .easyorder-grid tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }
    
    .easyorder-grid tbody td:last-child {
        border-bottom: none;
    }
    
    .easyorder-grid tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        flex: 0 0 120px;
    }
    
    .easyorder-grid tbody td input,
    .easyorder-grid tbody td select {
        flex: 1;
        max-width: 200px;
    }
    
    .col-action {
        justify-content: center !important;
    }
}
