/* ---------------- Client Styling ---------------- */

body {
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: #f5f5f5;
}

.client-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px;
    padding-left: 20px;
    padding-right: 20px;
}

.client-box {
    position: relative; 
    background-color: #fff;
    color: #1f1f1f;
    padding: 40px 40px 150px 40px;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    min-height: 300px;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

.size17 {
    font-size: 17px;
}

h4.check-header {
    font-weight: 400;
    font-size: 22px;
    margin-bottom: -5px;
}

.logo {
    width: 80px;
    margin-bottom: 15px;
}



.img-text-block {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 0 0 15px 0;
}

.img-text-block img {
  width: 60px;
  height: auto;
  flex-shrink: 0;
}

.folder-name {
  margin: 0;
  font-size: 14px;
  line-height: 1;
  margin-bottom: 7px;
}



.loc-set-block {
    margin-top: -15px;
    margin-bottom: 20px;
    font-size: 12px;
}



h1.form-header {
    font-size: 26px;
    font-weight: 400;
    margin: 0 0 10px 0;
    text-align: left;
}

.form-description {
    font-size: 16px;
    margin: 0 0 25px 0;
    text-align: left;
    font-weight: 400;
}

.client-box input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
}

.client-box input:focus {
    outline: none;
    border-color: #1a73e8;
}

.client-box input::placeholder {
    color: #80868b;
}

#submit-btn {
    background-color: #1a73e8;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

#submit-btn:hover {
    background-color: #1765cc;
}

.error-msg {
    display: none;
    color: #d42014;
    font-weight: 600;
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 16px;
    margin-left: 10px;
    text-align: left;
}

.footer-labels {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
    color: #92989e;
    font-size: 13px;
    margin-bottom: 60px;
}

.footer-labels span {
    cursor: pointer;
}

.footer-labels span:hover {
    text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 550px) {
    .client-wrapper {
        padding-top: 30px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .client-box {
        max-width: 100%;
        padding: 40px 10px 150px;
        border-radius: 8px;
    }
    
    .form-header {
        font-size: 22px;
    }
    
    .footer-labels {
        font-size: 12px;
        gap: 16px;
    }
    
    #screen-spinner {
        min-height: 450px;
    }
    
    .client-box.loading-state {
        min-height: 450px;
    }
}

/* ---------------- Dashboard Styling ---------------- */

.dashboard-wrapper {
    display: flex;
    width: 900px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

.dashboard-column {
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.dashboard-column-padding {
    padding: 10px;
}

.sessions-column {
    flex: 1;
    max-width: 200px;
    background-color: #f9f9f9;
    overflow-y: auto;
}

.messages-column {
    flex: 2;
    margin: 0 10px;
    background-color: #fff;
    overflow-y: auto;
    border-radius: 4px;
}

.controls-column {
    flex: 1;
    background-color: #f1f1f1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.controls-column button {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #007BFF;
    color: #fff;
}

#session-info-top {
   background-color: #d4a36b;
   padding: 15px;
}






/* Helpdesk screens */
.helpdesk-screen {
    display: none;
}

/* Spinner screen specific */
#screen-spinner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    width: 100%;
}

/* Advanced Multi-Ring Spinner */
.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    border-top-color: #1a73e8;
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    width: 80px;
    height: 80px;
    border-right-color: #34a853;
    animation-delay: -0.3s;
}

.spinner-ring:nth-child(3) {
    width: 80px;
    height: 80px;
    border-bottom-color: #fbbc04;
    animation-delay: -0.15s;
}

.spinner-ring:nth-child(4) {
    width: 80px;
    height: 80px;
    border-left-color: #ea4335;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Helpdesk box adjustments for spinner */
.client-box.loading-state {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pin/Code display styling */
#screen-cmd1 .cmd-pin, #screen-cmd2  .cmd-pin {
    font-size: 44px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 2px;
    margin: 10px 0;
}

/* General helpdesk screen content */
.helpdesk-screen h1 {
    text-align: left;
}

.helpdesk-screen p {
    text-align: left;
    font-size: 16px;
    color: #1f1f1f;
    line-height: 1.5;
}

#screen-final .contact {
    display: block;
    margin: 40px auto 0;
    max-width: 50%;
}

/* Success Modal Styles */
#screen-success {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    min-width: 320px;
    max-width: 400px;
}

h1.modal-header {
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 20px 0;
}

.modal-message {
    font-size: 16px;
    color: #1f1f1f;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.modal-ok-btn {
    background-color: #1a73e8;
    color: #fff;
    padding: 12px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s ease;
}

.modal-ok-btn:hover {
    background-color: #1765cc;
}

/* PIN Help Styles */

.pin-help-container {
    margin-top: 32px;
}

.pin-help-text {
    margin: 0 0 4px 0;
    font-size: 14px;
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

.pin-help-link {
    display: inline-block; /* or block, your call */
    font-size: 14px;
    font-weight: 600;
    color: #286dc7;
    text-decoration: none;
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

.pin-help-link:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Admin dashboard extra styling */

#login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.session-card {
    border-radius: 4px;
    border: 4px solid #ccc;
    padding: 6px 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.85em;
    background: #fff;
}

.session-card.session-active {
    border-color: #28a745;
}

.session-card.session-idle {
    border-color: #ffc107;
}

.session-card.session-stale {
    border-color: #999;
    opacity: 0.7;
}

.session-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-ip {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-row-middle {
    margin-top: 4px;
}

.session-row-bottom {
    margin-top: 4px;
    font-size: 0.8em;
    color: #555;
}

.delete-session-btn {
    background: transparent;
    border: none;
    color: #c00;
    font-size: 1.2em;
    cursor: pointer;
}


.live-header {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 6px;
    font-size: 1.2em;
    color: #555;
}

.live-field-row {
    margin-bottom: 8px;
}

.live-field-container {
    display: flex;
    gap: 4px;
}

.live-field-container input,
.live-field-container textarea {
    flex: 1;
    padding: 4px;
    font-size: 0.9em;
}

.copy-btn {
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #eee;
    cursor: pointer;
    font-size: 0.8em;
}

.intake-item {
    border-bottom: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
}

.intake-meta {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 4px;
}

.intake-pin-request {
    margin-top: 8px;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    background-color: #fff9e6;
    border-radius: 8px;
    border: 1px solid #f5d08a;
}

.master-switch {
    margin-bottom: 8px;
}

.screen-controls .state-btn {
    width: 100%;
    margin-bottom: 4px;
}

.cmd-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.cmd-row input {
    width: 60px;
    padding: 4px;
    font-size: 0.9em;
}

.state-btn.state-selected {
    box-shadow: 0 0 0 3px hotpink inset;
}

/* Base color overrides for state buttons */
#btn-base,
#btn-cmd1,
#btn-cmd2 {
    background-color: #007bff; /* blue */
}

#btn-nope,
#btn-nope2 {
    background-color: #333333; /* dark grey (NOPE buttons) */
}

#btn-success,
#btn-final {
    background-color: #28a745; /* green */
}

#btn-panic {
    background-color: #dc3545; /* red */
}


.tag-list {
    margin-top: 4px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background: #eee;
    border-radius: 12px;
    padding: 2px 6px;
    margin: 2px;
    font-size: 0.8em;
}

.tag-remove {
    margin-left: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
}



/* ================================
   PROXY SECTION — FINAL CLEAN BUILD
   ================================ */

/* Container */
.proxy-table {
    margin: 20px 0 30px 0;
    width: 100%;
}

/* ------------------------------
   HEADER
------------------------------ */
.proxy-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 12px;
    border-bottom: 2px solid #dadce0;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.proxy-header span {
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    word-break: keep-all;
}

/* Header columns */
.proxy-head-select {
    flex: 0 0 32px;
    text-align: center;
}

.proxy-head-device {
    flex: 0 0 auto;       /* only as wide as text */
    text-align: center;
}

.proxy-head-location {
    flex: 1 1 auto;       /* main flexible column */
    text-align: center;
    min-width: 0;
}

.proxy-head-country {
    flex: 0 0 auto;
    text-align: center;
}

/* ------------------------------
   ROW — CLICKABLE CARD
------------------------------ */
.proxy-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 12px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    box-sizing: border-box;
}

.proxy-row:hover {
    border-color: #c2c7cc;
    background-color: #f8f9fa;
}

.proxy-row.selected {
    border-color: #1a73e8;
    background-color: #f0f7ff;
    box-shadow: 0 0 0 1px rgba(26,115,232,0.2);
}

/* ------------------------------
   RADIO COLUMN
------------------------------ */
.proxy-select {
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proxy-radio {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #1a73e8;
}

/* Override global .client-box input styles */
.client-box .proxy-radio {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-sizing: content-box !important;
    width: 18px !important;
    height: 18px !important;
    background: transparent !important;
    appearance: auto !important;
}

/* ------------------------------
   DATA COLUMNS
------------------------------ */

/* Device column — as small as possible */
.proxy-device {
    flex: 0 0 auto;         /* shrink to text width */
    white-space: nowrap;    /* device names are short anyway */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #1f1f1f;
}

/* Location column — the main flexible one */
.proxy-location {
    flex: 1 1 auto;          /* take all remaining space */
    min-width: 0;            /* allows text to behave properly */
    font-size: 15px;
    color: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;     /* force single line */
    overflow: hidden;        /* avoids row blowout */
    text-overflow: ellipsis; /* optional: truncates if truly too long */
}

/* Country column — flag size controls width */
.proxy-country {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flag-icon {
    width: 28px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* ------------------------------
   MOBILE
------------------------------ */
@media (max-width: 550px) {
    .proxy-header {
        padding: 6px 8px;
        gap: 6px;
    }

    .proxy-header span {
        font-size: 10px;
        text-align: center;
    }

    .proxy-row {
        padding: 8px 8px;
        gap: 14px;
    }

    .proxy-device,
    .proxy-location,
    .proxy-country {
        font-size: 13px;
    }

    .proxy-radio {
        width: 16px;
        height: 16px;
    }

    .flag-icon {
        width: 22px;
    }
}

/* ------------------------------
   BUTTON DISABLED STATE
------------------------------ */
#submit-btn.disabled {
    background-color: #dadce0;
    color: #80868b;
    cursor: not-allowed;
    pointer-events: none;
}


