/* Nutify Setup Wizard Styles */

/* Basic Structure */
.setup-body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.setup-header-container {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.setup-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.setup-logo-container {
    text-align: center;
}

.setup-header-logo {
    height: 40px;
}

.setup-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.setup-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 0;
    margin-top: auto;
}

.setup-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    font-size: 0.9rem;
    color: #6c757d;
}

.setup-footer-timezone {
    margin-top: 5px;
    font-size: 0.8rem;
}

/* General Layout */
.setup-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.setup-header {
    text-align: center;
    margin-bottom: 30px;
}

.setup-logo {
    max-width: 180px;
    margin-bottom: 20px;
}

.setup-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.setup-intro {
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 30px;
}

.admin-notice {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-notice i {
    color: #f1c40f;
    font-size: 1.1rem;
}

/* Cards and Steps */
.setup-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.card-heading {
    background-color: #f5f7fa;
    padding: 15px 25px;
    border-bottom: 1px solid #e5e9f2;
    display: flex;
    align-items: center;
}

.card-heading i {
    font-size: 1.4rem;
    margin-right: 15px;
    color: #3498db;
}

.card-heading h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.card-content {
    padding: 25px;
}

/* Steps Navigation */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.wizard-steps::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e5e9f2;
    z-index: 1;
}

.step {
    position: relative;
    text-align: center;
    z-index: 2;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e9f2;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #3498db;
    color: white;
}

.step.completed .step-number {
    background-color: #2ecc71;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.step.active .step-label {
    color: #3498db;
    font-weight: 600;
}

.step.completed .step-label {
    color: #2ecc71;
}

/* Form Elements */
.wizard-form {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
}

/* Form styles that apply to all forms in setup pages */
form {
    width: 100%;
    max-width: 100%;
}

.form-group {
    margin-bottom: 25px;
    width: 100%;
    max-width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    width: 100%;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s ease;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #3498db;
    outline: none;
}

.form-help {
    font-size: 0.85rem;
    color: #777;
    margin-top: 6px;
}

/* Mode Selector */
.mode-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.mode-option {
    flex: 1;
    min-width: 200px;
    border: 1px solid #e5e9f2;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mode-option:hover {
    border-color: #bdc3c7;
}

.mode-option.selected {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.mode-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #3498db;
}

.mode-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.mode-description {
    font-size: 0.9rem;
    color: #666;
}

/* Navigation Buttons */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    width: 100%;
}

/* When prev button is hidden and next button is visible, align next to the right */
.wizard-actions:has(.back-btn.hidden) .next-btn:not(.hidden) {
    margin-left: auto;
}

/* Fallback for browsers that don't support :has() */
.wizard-actions .back-btn.hidden ~ .next-btn:not(.hidden) {
    margin-left: auto;
}

/* For welcome page and any page with only next button, align it to the right */
.wizard-actions:has(.next-btn:only-child) {
    justify-content: flex-end;
}

.wizard-actions.text-center {
    justify-content: center;
}

.nav-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    min-width: 120px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.back-btn {
    background-color: #f5f7fa;
    color: #555;
}

.back-btn:hover {
    background-color: #e5e9f2;
}

.next-btn {
    background-color: #3498db;
    color: white;
}

.next-btn:hover {
    background-color: #2980b9;
}

.finish-btn {
    background-color: #2ecc71;
    color: white;
}

.finish-btn:hover {
    background-color: #27ae60;
}

/* Summary Section */
.config-summary {
    margin-top: 20px;
}

.summary-item {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.summary-label {
    font-weight: 500;
    width: 200px;
    padding-right: 20px;
}

.summary-value {
    flex: 1;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.close-alert {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}

.close-alert:hover {
    opacity: 1;
}

/* Config Preview */
.config-preview {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre;
}

/* Config Tabs */
.config-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.config-tab {
    padding: 8px 16px;
    margin-right: 5px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
}

.config-tab:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.config-tab.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

/* Info tooltip icons */
.info-icon {
    color: #3498db;
    margin-left: 5px;
    cursor: help;
    font-size: 0.9rem;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #555;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 0;
    margin-left: 0;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    font-weight: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Test configuration result modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-close {
    font-size: 1.5rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    text-align: right;
    border-top: 1px solid #e5e9f2;
    padding-top: 15px;
}

.upsc-output {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* Center text elements */
.text-center {
    text-align: center;
}

/* Success and error icons */
.success-icon, .error-icon {
    font-size: 3rem;
    display: block;
    margin: 0 auto 20px;
}

.success-icon {
    color: #2ecc71;
}

.error-icon {
    color: #e74c3c;
}

/* Complete message container */
.complete-message {
    padding: 30px 0;
}

/* Hide elements */
.hidden {
    display: none !important;
}

/* Media Queries for Responsive Design */
@media (max-width: 992px) {
    .setup-container {
        max-width: 95%;
    }
    
    .setup-card {
        max-width: 100%;
    }
    
    .tooltip .tooltip-text {
        transform: none;
        left: auto;
        right: 0;
    }
}

@media (max-width: 768px) {
    .setup-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .setup-header {
        margin-bottom: 20px;
    }
    
    .setup-title {
        font-size: 1.8rem;
    }
    
    .setup-intro {
        font-size: 1rem;
    }
    
    .card-content {
        padding: 20px 15px;
    }
    
    .wizard-steps {
        margin-bottom: 20px;
    }
}

/* Special styles for tooltips and labels with tooltips */
.form-group label .tooltip {
    display: inline-block;
    vertical-align: middle;
}

/* Mode-specific configurations */
.mode-config {
    width: 100%;
    max-width: 100%;
}

/* Tooltip text width adjustments */
.tooltip .tooltip-text {
    width: 280px;
    margin-left: -140px;
}

@media (max-width: 576px) {
    .tooltip .tooltip-text {
        width: 220px;
        margin-left: -110px;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group select,
    .form-group input[type="text"],
    .form-group input[type="password"] {
        padding: 8px 10px;
        font-size: 0.95rem;
    }
} 

/* Input with button (for scan) */
.input-with-button {
    display: flex;
    width: 100%;
}

.input-with-button input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.scan-button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
}

.scan-button i {
    margin-right: 5px;
}

.scan-button:hover {
    background-color: #2980b9;
}

/* Scan Results Dialog */
.scan-results {
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.scan-results-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 1rem;
}

.scan-device {
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.scan-device:hover {
    background-color: #f0f7ff;
}

.scan-device.selected {
    background-color: #e1f0ff;
    border-color: #3498db;
}

.scan-device-name {
    font-weight: 600;
    color: #2c3e50;
}

.scan-device-details {
    font-size: 0.85rem;
    color: #555;
    margin-top: 5px;
}

.scan-loading {
    text-align: center;
    padding: 20px;
    color: #777;
}

.scan-loading i {
    margin-right: 8px;
}

.no-devices-found {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}