/* Style Reset & Base */
.zemin-boya-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
    font-family: 'Inter', sans-serif;
    max-width: 1000px;
    margin: 40px auto;
    color: #333;
}

.zb-input-section h3,
.zb-tools h4,
.zb-summary h4 {
    margin: 0 0 15px 0;
    font-weight: 600;
    color: #1a1a1a;
}

.zb-inputs {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.zb-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.zb-input-group label {
    font-size: 14px;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.zb-input-group input {
    padding: 12px 16px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.zb-input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.zb-btn {
    padding: 12px 24px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zb-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.zb-btn-primary {
    background: #3b82f6;
    width: 100%;
    margin-top: 15px;
    font-size: 18px;
}

.zb-btn-primary:hover {
    background: #2563eb;
}

.zb-btn-whatsapp {
    background: #25D366;
    color: #fff;
    width: 100%;
    margin-top: 15px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.zb-btn-whatsapp:hover {
    background: #128C7E;
}

/* Workspace Layout */
.zb-workspace {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 30px;
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

/* Color Palette */
.zb-color-palette {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns */
    gap: 12px;
    margin-bottom: 20px;
}

.zb-color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.zb-color-option:hover {
    transform: scale(1.05);
    z-index: 2;
}

.zb-color-option.selected {
    border-color: #111;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
}

.zb-color-info {
    font-size: 12px;
    text-align: center;
    margin-top: 4px;
    color: #666;
}

.zb-current-selection {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
}

.zb-color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: #eee;
    /* Default */
}

/* Grid Area */
.zb-workspace-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.zb-zoom-controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 5px;
}

.zb-btn-icon {
    padding: 6px 10px;
    font-size: 14px;
    background: #f1f1f1;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.zb-btn-icon:hover {
    background: #e1e1e1;
}

.zb-grid-container {
    background: #f0f2f5;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    height: 600px;
    /* Fixed height for scroll area */
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.zb-grid {
    display: grid;
    gap: 1px;
    background: #ccc;
    /* Grid line color */
    border: 1px solid #ccc;
    transform-origin: center center;
    transition: transform 0.2s ease-out;
}

.zb-cell {
    width: 40px;
    /* Represents 40cm visually condensed or scaled? It says 40x40cm boxes. On screen 40px is good. */
    height: 40px;
    background: #fff;
    cursor: pointer;
    transition: background 0.1s;
}

.zb-cell:hover {
    filter: brightness(0.95);
}

/* Summary */
.zb-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    height: fit-content;
}

.zb-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}

.zb-summary-item.total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e1e1e1;
    font-weight: 700;
    font-size: 18px;
    color: #111;
}

/* Responsive */
@media (max-width: 900px) {
    .zb-workspace {
        grid-template-columns: 1fr;
    }

    .zb-grid-container {
        order: -1;
        /* Grid on top in mobile? maybe not. */
    }
}