/* Smart Home Configurator Styles */

.shc-wrapper {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px 0;
    font-family: inherit;
    background: #fafafa;
}

.shc-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
}

.shc-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

/* Toolbar */

.shc-toolbar {
    flex: 1 1 220px;
    max-width: 280px;
    background: #fff;
    border: 1px solid #e3e3e3;
    padding: 15px;
    border-radius: 6px;
}

.shc-toolbar h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.shc-toolbar-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.shc-device-type {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s, border-color 0.15s;
}

.shc-device-type--active {
    border-color: #0073aa;
    background: #e5f3ff;
}

.shc-device-label {
    display: inline-block;
}

.shc-tip {
    font-size: 0.8rem;
    color: #666;
}

/* Canvas */

.shc-canvas-wrapper {
    flex: 2 1 400px;
    min-width: 300px;
}

.shc-canvas {
    position: relative;
    width: 100%;
    height: 650px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: top center !important;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: visible;
    background-color: #f0f0f0;
}

/* Device instance on canvas */

.shc-device-instance {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(0, 115, 170, 0.9);
    color: #fff;
    font-size: 0.7rem;
    cursor: move;
    white-space: nowrap;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.shc-device-instance-label {
    display: inline-block;
}

/* Device type colors */

.shc-device-outdoor_camera     { background: rgba(0, 115, 170, 0.9); }
.shc-device-indoor_camera      { background: rgba(0, 150, 80, 0.9); }
.shc-device-motion_sensor      { background: rgba(200, 120, 0, 0.9); }
.shc-device-door_sensor        { background: rgba(170, 0, 115, 0.9); }
.shc-device-smoke_detector     { background: rgba(190, 0, 0, 0.9); }
.shc-device-thermostat         { background: rgba(100, 60, 200, 0.9); }
.shc-device-hub                { background: rgba(60, 60, 60, 0.9); }
.shc-device-flood_sensor       { background: rgba(0, 120, 160, 0.9); }
.shc-device-smart_lock         { background: rgba(120, 90, 0, 0.9); }

/* Form */

.shc-form {
    background: #fff;
    border: 1px solid #e3e3e3;
    padding: 15px;
    border-radius: 6px;
}

.shc-form-row {
    margin-bottom: 12px;
}

.shc-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.shc-form-row input,
.shc-form-row textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}

.shc-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
}

.shc-submit:hover {
    background: #005f8c;
}

/* Success message (if you echo it in template) */
.shc-success {
    padding: 10px 12px;
    background: #e6ffed;
    border: 1px solid #8fd19e;
    border-radius: 4px;
    color: #1a4f2c;
    margin: 10px 0;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .shc-layout {
        flex-direction: column;
    }

    .shc-canvas {
        height: 450px;
    }
}
