/* Inherit most styles from style.css, specific overrides here */

body {
    /* Use the same background as index.html */
    background-image: linear-gradient(rgba(11, 17, 32, 0.85), rgba(11, 17, 32, 0.95)), url('../img/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Custom styles for form elements to match the general theme */
.form-control,
.form-select,
.input-group-text {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* --- aesthetic updates --- */

/* Hide Number Spinners (Arrows) for cleaner Port Input */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- Focus & Seamless Group Strategy --- */

/* 1. Standalone Inputs Focus (IP, License, Select) */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
    border-color: #ffc107 !important;
    z-index: 3;
}

/* 2. Input Groups (Password, Port) - Unified Container */
.input-group {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    /* More rounded */
    background-color: rgba(15, 23, 42, 0.6);
    transition: all 0.2s ease;
    height: 54px;
    /* Taller inputs */
    display: flex;
    align-items: center;
    /* Center vertically */
    overflow: hidden;
    /* Ensure rounded corners clip children */
}

/* Standalone inputs taller too */
.form-control:not(.input-group .form-control),
.form-select {
    height: 54px;
    border-radius: 0.5rem !important;
}

/* Button taller */
.btn-warning {
    height: 54px;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When any child is focused, light up the WHOLE group */
.input-group:focus-within {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

/* Remove default borders and shadows from children so they merge perfectly */
.input-group .form-control,
.input-group .input-group-text,
.input-group .btn {
    background: transparent !important;
    /* Use group background */
    border: none !important;
    box-shadow: none !important;
    height: 100%;
    /* Fill container height */
    padding: 0 1rem;
    /* More breathing room */
}

/* Highlight icons when group is active */
.input-group:focus-within i {
    color: #ffc107;
    transition: color 0.3s ease;
}

/* --- Stepper Progress --- */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
    /* Increase spacing */
    padding: 0 10px;
}

/* Connecting Line (Background) */
.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 25px;
    /* Half of circle height (50px) */
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    transform: translateY(-50%);
}

.stepper-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

/* The Circle */
.stepper-item .step-counter {
    width: 50px;
    height: 50px;
    background-color: #0f172a;
    /* Dark background matches input */
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* The Label */
.stepper-item .step-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Active State */
.stepper-item.active .step-counter {
    border-color: #ffc107;
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.stepper-item.active .step-name {
    color: #ffc107;
    font-weight: bold;
}

/* Completed State */
.stepper-item.completed .step-counter {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
    /* Dark icon on gold */
}

.stepper-item.completed .step-name {
    color: #ffc107;
}

/* Error State */
.stepper-item.error .step-counter {
    border-color: #ef4444;
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Terminal Scrollbar */
.log-terminal::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.log-terminal::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.log-terminal::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
    transition: background 0.2s;
}

.log-terminal::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.log-terminal {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}

/* Loading state for button */
.btn-loader {
    display: inline-block;
}

/* Pop-in animation for RDP details */
@keyframes popIn {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


.animate-pop-in {
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* --- Modal Glass Styles --- */
.glass-modal {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.glass-modal-error {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fff;
}