/* Container styling */
.webusb-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.webusb-device-title {
    margin-bottom: 24px;
    font-size: 1.5em;
    font-weight: 600;
}

/* Material Design Card Styling */
.webusb-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.step-card {
    display: block;
}

.step-card.hidden-step {
    display: none;
}

.step-card.active-step {
    opacity: 1;
    border-left: 4px solid #046bd2;
    /* Brand color */
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.card-header .step-icon {
    font-size: 24px;
    color: #046bd2;
    margin-right: 12px;
}

.card-header .step-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 500;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.step-description {
    margin-top: 0;
    margin-bottom: 16px;
    color: #495057;
    line-height: 1.5;
}

/* Buttons */
.webusb-btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.webusb-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.webusb-btn-primary {
    color: #fff;
    background-color: #046bd2;
    border-color: #046bd2;
    box-shadow: 0 2px 4px rgba(4, 107, 210, 0.3);
    align-self: flex-end;
}

.webusb-btn-primary:hover:not(:disabled) {
    background-color: #035aa6;
    border-color: #035aa6;
}

/* Log output terminal style - MD3 Light Mode */
.log-card {
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
}

.log-header {
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-header h3 {
    margin: 0;
    font-size: 1em;
    font-weight: 500;
}

#webusb-log {
    margin: 0;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    color: #212529;
    /* dark text */
    background: transparent !important;
    /* Prevent WP theme from overriding */
    padding: 10px;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-disconnected {
    background-color: #f8d7da;
    /* Light Red */
    color: #842029;
}

.status-connected {
    background-color: #d1e7dd;
    /* Light Green */
    color: #0f5132;
}

.mt-4 {
    margin-top: 24px;
}