/* src/wwwroot/css/line-config.css */

:root {
    --primary-color: #00bcd4; /* Original primary color from line-config.html */
    --background-color: #1a1a2e; /* Dark background from line-config.html */
    --card-background-color: rgba(255, 255, 255, 0.05); /* From line-config.html container */
    --text-color: #e0e0e0; /* From line-config.html body */
    --label-color: #a0a0a0; /* From line-config.html labels */
    --border-color: rgba(255, 255, 255, 0.18); /* From line-config.html container border */
    --input-background: rgba(0, 0, 0, 0.3); /* From line-config.html input */
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ffeb3b;
}

body {
    background: linear-gradient(135deg, var(--background-color), #16213e, #0f3460); /* From original line-config.html body */
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; /* From original line-config.html body */
}

.container {
    max-width: 700px; /* Adjust as needed, slightly wider than 500px but not full-width like message-feature-setting.html's 900px */
    margin-top: 40px; /* Add some top margin */
}

/* Header styles */
h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2em;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
    text-align: center;
}

/* Form container/card style */
.main-content .container { /* Targeting the container inside main-content */
    background: var(--card-background-color);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    width: 100%;
    /* max-width is already set on .container above */
    text-align: center;
    animation: fadeIn 1s ease-out; /* Keeping the animation */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input group styles */
.input-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--label-color);
    font-size: 0.9em;
}

.input-group input {
    flex-grow: 1; /* Allow input to take available space */
    padding: 12px 10px;
    padding-right: 40px; /* Make space for the icon */
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: var(--input-background);
    color: var(--text-color);
    font-size: 1em;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #00e5ff; /* Lighter primary color */
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

.input-field-wrapper {
    position: relative;
    display: flex; /* Use flex to align input and icon */
    align-items: center; /* Vertically center items */
    width: 100%; /* Ensure it takes full width within input-group */
}

.input-group .icon {
    position: absolute;
    right: 10px;
    color: var(--primary-color);
    cursor: pointer; /* Indicate it's clickable */
    z-index: 2; /* Ensure icon is above input */
}

/* Button styles */
.button-group {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

button {
    background: linear-gradient(45deg, var(--primary-color), #00e5ff);
    color: #1a1a2e; /* Dark text for contrast */
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
    margin: 0 10px; /* Add margin for spacing between buttons */
}

button:hover {
    background: linear-gradient(45deg, #00e5ff, var(--primary-color));
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.6);
    transform: translateY(-2px);
}

.cancel-button {
    background: linear-gradient(45deg, #6c757d, #8d949b); /* Greyish tone for cancel */
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.cancel-button:hover {
    background: linear-gradient(45deg, #8d949b, #6c757d);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

/* Message styles */
.message {
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--warning-color);
    text-align: center;
}

.message.success {
    color: var(--success-color);
}

.message.error {
    color: var(--error-color);
}

/* Top-left Back Button Styles (Copied from mqtt-config.css) */
.top-left-back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000; /* 確保在最上層 */
}

.top-left-back-button a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 174, 255, 0.2); /* 半透明背景 */
    color: #00aeff; /* 圖示顏色 */
    font-size: 1.2em;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.top-left-back-button a:hover {
    background-color: rgba(0, 174, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 174, 255, 0.8);
    transform: scale(1.05);
}