/* plan.css */
.table-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.table-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    min-width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.table-dialog-container {
    padding: 24px;
}

.table-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dialog-close-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.dialog-close-button:hover {
    background: #f0f0f0;
}

.grid-selector-container {
    margin-bottom: 24px;
}

.grid-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.grid-selector {
    display: grid;
    grid-template-columns: repeat(10, 25px);
    gap: 2px;
    margin-bottom: 10px;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
}

.grid-cell {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

.grid-cell.selected {
    background: #0066cc;
    border-color: #0052a3;
}

.dimensions-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.template-section {
    margin-bottom: 24px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.template-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: #0066cc;
    background: #f8f8f8;
}

.template-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.template-name {
    font-size: 12px;
    color: #666;
}

.basic-options {
    margin-bottom: 24px;
}

.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.option-row label {
    margin-left: 8px;
}

.style-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.select-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.select-container select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.preview-section {
    margin-bottom: 24px;
}

.preview-area {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f8f8;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.primary-button, .secondary-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.primary-button {
    background: #0066cc;
    color: white;
}

.primary-button:hover {
    background: #0052a3;
}

.secondary-button {
    background: #f0f0f0;
    color: #333;
}

.secondary-button:hover {
    background: #e0e0e0;
}

.enhanced-table {
    width: 100%;
    border-collapse: collapse;
}

.enhanced-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.enhanced-table th, .enhanced-table td {
    min-width: 100px;
    transition: all 0.2s ease;
}

.enhanced-table th:hover, .enhanced-table td:hover {
    background: #f8f8f8;
}