/* Automation Page - Minimal White List */
.automation-page {
    min-height: 100vh;
    background: #ffffff;
    color: #1a1a1a;
    padding: 120px 20px 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

.automation-container {
    max-width: 70vw;
    margin: 0 auto;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: #ce2a8a;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
    margin-left: 16px;
    font-family: monospace;
    text-transform: uppercase;
}

.automation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e5e5e5;
}

.automation-item {
    font-size: 12px;
    color: #1a1a1a;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: monospace;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.4;
    pointer-events: none;
}

.automation-item::before {
    content: '→';
    position: absolute;
    right: 24px;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 20px;
}

.automation-item:hover {
    background: #fafafa;
    padding-left: 32px;
}

.automation-item:hover::before {
    opacity: 1;
    right: 32px;
}

/* Disabled state - override hover effects */
.automation-item {
    opacity: 0.4;
    pointer-events: none;
}

.automation-item:hover {
    background: transparent;
    padding-left: 24px;
}

.automation-item:hover::before {
    opacity: 0;
    right: 24px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-left {
    display: flex;
    flex-direction: column;
}

.model-viewer {
    position: relative;
    background: #fafafa;
    border-radius: 12px;
    padding: 40px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-placeholder {
    width: 100%;
    max-width: 400px;
}

.model-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

.model-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.control-btn {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: #f5f5f5;
}

.axis-label {
    position: absolute;
    font-size: 14px;
    color: #666;
}

.y-axis {
    top: 20px;
    left: 20px;
}

.x-axis {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.modal-right {
    display: flex;
    margin-top: 50px;
    flex-direction: column;
    gap: 32px;
    height: 60%;
}

.info-section h3,
.specs-section h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-family: monospace;
}


.info-grid,
.spec-grid {
    display: grid;
    gap: 20px;
}

.info-grid {
    grid-template-columns: 2fr 1fr;
}

.info-item,
.spec-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: monospace;
}

.info-item label,
.spec-item label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.info-item select,
.info-item input,
.spec-item select,
.spec-item input {
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1a1a1a;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.color-preview {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid #e5e5e5;
}

.color-picker input {
    flex: 1;
}

.color-picker button {
    background: white;
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.save-btn {
    /* background: #ce2a8a; */
    background: gray;
    color: #ffffff;
    border: none;
    padding: 14px 48px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    pointer-events: none;
}

.save-btn:hover {
    background: #39003e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(195, 255, 92, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
    .automation-container {
        max-width: 85vw;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .automation-page {
        padding: 100px 16px 60px;
    }

    .automation-container {
        max-width: 95vw;
    }

    .page-title {
        font-size: 16px;
    }

    .automation-item {
        font-size: 12px;
        padding: 12px 16px;
    }

    .automation-item::before {
        font-size: 14px;
        opacity: 1;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
        gap: 20px;
    }

    .modal-title {
        font-size: 10px;
    }

    .model-viewer {
        min-height: 300px;
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .automation-page {
        padding: 90px 12px 50px;
    }

    .automation-item {
        font-size: 11px;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }
}

/* Clean scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}
