* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.icon-blue {
    color: rgb(0, 97, 235);
}

.icon-gray {
    color: #676767;
}

.icon-up, .icon-down {
    height: .65em;
    width: .65em;
    fill: rgb(0, 97, 235);
}

.icon-info {
    width: 18px;
    height: 18px;
}
.tooltip {
    position: relative;
    display: inline-flex;
    margin-left: 4px;
}

.tooltiptext {
    visibility: hidden;
    width: max-content;
    background-color: #031b4e;
    color: white;
    text-align: center;
    padding: 6px 8px;
    border-radius: 3px;
    position: absolute;
    z-index: 10000;
    bottom: -10%;
    left: 125%;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}
.reload-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.reload-icon use {
    pointer-events: none;
}

.reload-icon:hover {
    opacity: 1;
}
.reload-icon.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.collapsible-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-bottom 0.4s ease-in-out, padding 0.4s ease-in-out;
    margin-bottom: 0;
}

.collapsible-section.expanded {
    max-height: 1000px;
    opacity: 1;
    overflow: visible;
}

section.card.collapsible-section {
    padding: 0;
}

section.card.collapsible-section.expanded {
    margin-bottom: 1rem;
    padding: 3rem;
}

body {
    font-family: "proxima-nova", "proxima nova", "helvetica neue", "helvetica", "arial", sans-serif;
    background: rgb(243, 245, 249);
    min-height: 100vh;
    padding: 20px 20px 20px 80px;
    color: #031b4e;
    font-size: 1rem; /* This will be 16px */
    
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    position: fixed;
    bottom: 0px;
    left: 14px;
    transform: rotate(-90deg);
    transform-origin: left top;
    color: white;
    z-index: 100;
    white-space: nowrap;
}

header h1 {
    font-size: 2em;
    font-weight: 400;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 64px;
    height: 100vh;
    background-color: #031b4e;
    z-index: 1000;
}

.sidebar .logo {
    background-image: url('/assets/cloud-logo.svg');
    width: 32px;
    height: 32px;
    display: block;
    margin: 16px 16px;
    opacity: 0.63;
    transition: opacity 0.4s linear;
    cursor: pointer;
}

.sidebar .logo:hover {
    opacity: 1;
}

.logo a {
    all: unset; /* Reset all inherited styles */
}

.subtitle {
    display: none;
}

.card {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 3rem;
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(3, 27, 78, 0.16), 0 1px 3px rgba(3, 27, 78, 0.2);
    transition: box-shadow 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    position: relative;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(3, 27, 78, 0.2), 0 4px 8px rgba(3, 27, 78, 0.24);
}

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

h1 {
    font-size: 2.4rem;
    font-weight: 300;
}

h2 {
    margin-top: 0;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .06rem;
}

h4 {
    color: #666;
    font-size: 1em;
    margin-bottom: 12px;
}

h5 {
    margin: .3rem 0;
    letter-spacing: .06rem;
    font-size: .8rem;
    line-height: .8rem;
    font-weight: 600;
}

/* Typography utility classes */
.font-darkGray {
    color: #676767;
}

.font-blueGray {
    color: #5b6987;
}

.font-blue {
    color: #0069ff;
}

.font-size-dot8 {
    font-size: .8rem;
}

.font-weight-400 {
    font-weight: 400;
}

.font-weight-600 {
    font-weight: 600;
}

.border-bottom-lightGray {
    border-bottom: 1px solid #dfdfdf;
}

.flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    align-items: center;
}

.flex-right {
    align-items: flex-end;
}

.flex-column {
    flex-direction: column;
}

.flex-start {
    justify-content: flex-start;
}

.flex-end {
    justify-content: flex-end;
}

.gap-dot2 {
    gap: .2rem;
}

.gap-dot5 {
    gap: .5rem;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.flex-column input[type="password"],
.flex-column input[type="text"] {
    flex: 0 0 auto;
    width: 100%;
}

.dropdown-wrapper {
    position: relative;
    flex: 1;
}

.dropdown-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.reload-icon {
    flex-shrink: 0;
    color: white;
}

.reload-icon:hover {
    opacity: 1 !important;
}

.input,
input[type="password"],
input[type="text"],
select,
textarea {
    flex: 1;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    outline: none;
    height: 48px;
    border: 1px solid #f1f1f1;
    line-height: 1.5;
    padding: 0 16px;
    font-size: 1rem;
    border-radius: 3px;
    background-color: #fff;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: rgb(91, 105, 135) dotted 2px;
    outline-offset: 2px;
    border-color: rgb(0, 97, 235);
}

textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    width: 100%;
    height: auto;
    min-height: 48px;
}

/* Dropdown styles */
.dropdown {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    max-height: 16rem;
    overflow-y: auto;
    margin-top: 1px;
    border-radius: 3px;
    z-index: 200;
    width: 100%;
    box-sizing: border-box;
    list-style: none;
    padding: 0;
}

.dropdown li {
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown li:hover {
    background-color: #f0f0f0;
}

button {
    appearance: none;
    margin: 0;
    font-family: inherit;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0px 1rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    line-height: 44px;
    height: 48px;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

.button-green {
    color: #fff;
    background: rgb(18, 124, 67);
}

.button-green:hover {
    background: rgb(10, 166, 83);
}

.button-green:focus {
    outline: #031b4e dotted 2px;
    outline-offset: 2px;
}

/* Disabled button styles - prevents hover and focus effects for green buttons */
.button-green:disabled,
.button-green:disabled:hover,
.button-green:disabled:focus {
    cursor: not-allowed; /* Maintain 'not-allowed' cursor */
    background: #f1f1f1; /* Light gray background to indicate disabled state */
    border: 1px solid #f1f1f1; /* Matching border color for a uniform look */
    color: #bbb; /* Light gray text color to indicate disabled state */
    box-shadow: none; /* Remove any box-shadow effects */
}

.button-red {
    color: #fff;
    background: #ED4F32;
}

.button-red:hover {
    background: #DA4429;
}

.button-red:focus {
    outline: #031b4e dotted 2px;
    outline-offset: 2px;
}

/* Disabled button styles - prevents hover and focus effects for red buttons */
.button-red:disabled,
.button-red:disabled:hover,
.button-red:disabled:focus {
    cursor: not-allowed; /* Maintain 'not-allowed' cursor */
    background: #f1f1f1; /* Light gray background to indicate disabled state */
    border: 1px solid #f1f1f1; /* Matching border color for a uniform look */
    color: #bbb; /* Light gray text color to indicate disabled state */
    box-shadow: none; /* Remove any box-shadow effects */
}

.button-blue {
    color: #fff;
    background: #0069ff;
    border-color: #0069ff;
}

.button-blue:hover {
    background: #0052ff;
    color: #fff;
}

.button-blue:focus {
    outline: 0;
    box-shadow: 0 0 0 1px #fff,0 0 2px 2px #0069ff;
}

/* Disabled button styles - prevents hover and focus effects */
.button-blue:disabled,
.button-blue:disabled:hover,
.button-blue:disabled:focus {
    cursor: not-allowed; /* Maintain 'not-allowed' cursor */    
    background: #f1f1f1; /* Light gray background to indicate disabled state */
    border: 1px solid #f1f1f1; /* Matching border color for a uniform look */
    color: #bbb; /* Light gray text color to indicate disabled state */
    box-shadow: none; /* Remove any box-shadow effects */
}

.button-blue-transparent {
    background: none;
    color: #0069ff;
    border-color: #0069ff;
}

.button-blue-transparent:hover {
    background: #0069ff;
    color: #fff;
}

.button-blue-transparent:focus {
    outline: 0;
    box-shadow: 0 0 0 1px #fff, 0 0 2px 2px #0069ff;
}

/* Disabled button styles - prevents hover and focus effects for blue transparent buttons */
.button-blue-transparent:disabled,
.button-blue-transparent:disabled:hover,
.button-blue-transparent:disabled:focus {
    cursor: not-allowed; /* Maintain 'not-allowed' cursor */
    background: #f1f1f1; /* Light gray background to indicate disabled state */
    border: 1px solid #f1f1f1; /* Matching border color for a uniform look */
    color: #bbb; /* Light gray text color to indicate disabled state */
    box-shadow: none; /* Remove any box-shadow effects */
}

.button-red-transparent {
    background: none;
    color: #ED4F32;
    border-color: #ED4F32;
}

.button-red-transparent:hover {
    background: #DA4429;
    border-color: #DA4429;
    color: #fff;
}

.button-red-transparent:focus {
    outline: 0;
    box-shadow: 0 0 0 1px #fff, 0 0 2px 2px #ED4F32;
}

/* Disabled button styles - prevents hover and focus effects for red transparent buttons */
.button-red-transparent:disabled,
.button-red-transparent:disabled:hover,
.button-red-transparent:disabled:focus {
    cursor: not-allowed;
    background: #f1f1f1;
    border: 1px solid #f1f1f1;
    color: #bbb;
    box-shadow: none;
}

/* Legacy button classes for backward compatibility */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-success {
    background: #4299e1;
    color: white;
}

.btn-success:hover {
    background: #3182ce;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.hint {
    color: #777;
    font-size: 0.9em;
    margin-top: 10px;
    line-height: 1.5;
}

.whitelist-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .whitelist-container {
        flex-direction: column;
    }
}

.whitelist-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.whitelist-actions {
    margin-top: 20px;
    display: flex;
    justify-content: left;    align-items: center;
    gap: 12px;}

#allowAll {
    min-width: 150px;
}

.ip-list {
    max-height: 300px;
    overflow-y: auto;
}

.ip-item {
    background: white;
    padding: 6px 12px;
    margin: 6px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.ip-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ip-item .remove-btn {
    height: 32px;
    line-height: 28px;
    font-size: 14px;
}

.action-text {
    cursor: pointer;
    color: #dc3545;
    font-weight: 600;
    background: transparent;
    padding: 0;
    border-radius: 3px;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-decoration: none;
    border: none;
    height: auto;
    line-height: normal;
}

.action-text:hover {
    color: #DA4429;
    text-decoration: underline;
}

.empty-state {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.loading-inline {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10000;
    min-width: 300px;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

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

.message.error {
    background: #fed7d7;
    color: #c53030;
    border-left: 2px solid #f56565;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 2px solid #48bb78;
}

.message.updating {
    background: #bee3f8;
    color: #2c5282;
    border-left: 2px solid #4299e1;
}

/* Scrollbar styling */
.ip-list::-webkit-scrollbar {
    width: 8px;
}

.ip-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ip-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.ip-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

/* Mappings Section */
.spaces-config {
}

.mapping-form {
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.mappings-list {
    margin-bottom: 10px;
}

.mappings-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 6px;
    padding: 12px;
    background: #f8f9fa;
}

.mapping-item {
    background: white;
    padding: 10px 12px;
    margin: 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.mapping-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mapping-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.mapping-label {
    flex: 1;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.mapping-ip {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.mapping-description {
    color: #666;
    font-size: 0.9em;
}

.mappings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.mappings-actions button {    
    flex: 1;    
    width: 100%;
}

.mappings-actions .btn {
    flex: 1;
    min-width: 150px;
}

.mappings-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mappings-actions .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mappings-actions .btn {
        min-width: 100%;
    }
}