/* =================== */
/* BOOTSTRAP ICONS */
/* =================== */
.bi {
    vertical-align: -.125em;
    fill: currentColor;
    display: inline-block;
    width: 1rem;
    height: 1rem;
}

/* =================== */
/* RESPONSIVE LAYOUT */
/* =================== */

/* Desktop */
@media (min-width: 992px) {
    .sidebar .offcanvas-lg {
        position: sticky;
        top: 48px;
    }
    .navbar-search {
        display: block;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-search {
        display: none;
    }

    .sidebar .offcanvas-lg {
        position: fixed;
        width: 280px;
        z-index: 1045;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar .offcanvas-lg.show {
        transform: translateX(0);
    }

    .offcanvas-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
    }

    main > .container {
        padding: 60px 20px 0;
    }

    .navbar .navbar-user-items {
        padding-right: 15px;
        font-size: 0.875rem;
    }

    /* Force container to use full viewport width on tablets */
    main.col-md-9.col-lg-10 {
        max-width: none !important;
        flex: 1 1 auto !important;
    }

    .container-fluid {
        max-width: none !important;
        padding: 0 !important;
    }

    .account-container {
        max-width: none !important;
        width: 100% !important;
    }

    .history-card {
        min-width: calc(100vw - 350px) !important; /* Full viewport minus sidebar */
    }
}

/* Mobile */
@media (max-width: 767px) {
    .navbar-search {
        display: none;
    }

    .sidebar .offcanvas-lg {
        position: fixed;
        width: 100%;
        max-width: 320px;
        z-index: 1045;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar .offcanvas-lg.show {
        transform: translateX(0);
    }

    main > .container {
        padding: 60px 15px 0;
    }
}

/* =================== */
/* LAYOUT STRUCTURE */
/* =================== */
main > .container {
    padding: 60px 15px 0;
}
main.account-content {
    margin-top: 60px;
}
main.site-content {
    margin-top: 60px;
}

/* Remove Bootstrap padding that constrains the main area */
main.col-md-9.col-lg-10 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove row margins that constrain width */
.account-container.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.account-container .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Remove column padding */
.account-container .col {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove card margins that might constrain width */
.account-container .site-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Add back minimal padding only where needed */
.account-container {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* =================== */
/* NAVIGATION */
/* =================== */
.sidebar .nav-link {
    font-size: .875rem;
    font-weight: 500;
}
.sidebar .nav-link.active {
    color: #2470dc;
}
.sidebar-heading {
    font-size: .75rem;
}

.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar-toggler {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    cursor: pointer;
}

.navbar-toggler:focus {
    text-decoration: none;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.navbar .form-control {
    padding: .75rem 1rem;
}

.navbar .navbar-user-items {
    padding-right: 20px;
    font-size: small;
}

/* =================== */
/* SITE COMPONENTS */
/* =================== */
a.site-breadcrumb {
    text-decoration: none;
    color: black;
}
span.site-breadcrumb-green {
    color: limegreen;
}
.site-deleted-text {
    text-decoration: line-through;
    text-decoration-color: red;
}
.site-sidebar-active {
    background-color: #ebf0f5;
}
.site-card {
    margin-bottom: 16px;
}
.site-card .label-text {
    font-weight: bold;
}
.top-bar-info-text {
    font-style: italic;
}
a.disabled {
    pointer-events: none;
    cursor: default;
}
code.text-code {
    white-space: normal;
}
button.site-page-reload-btn {
}
i.site-e-cancel, .site-e-submit {
    font-size: large;
}

/* =================== */
/* TABLES */
/* =================== */
table.pricing-table td {
    width: 33%;
}

@media (max-width: 991px) {
    table.pricing-table {
        font-size: 0.9rem;
    }
    table.pricing-table td {
        padding: 8px 4px;
    }
}

table.site-settings-table {
    width: 100%;
}
td.site-settings-label {
    width: 1%;
    white-space: nowrap;
    text-align: left;
}
td.site-settings-value {
    text-align: left;
}

table.site-config-properties {
    width: 100%;
    text-align: center;
}
td.site-config-label {
    width: 1%;
    white-space: nowrap;
    text-align: left;
}
td.site-config-value {
    text-align: left;
}

/* =================== */
/* FORMS */
/* =================== */
input.site-edit-input {
    width: 100%;
}
input.site-edit-password {
    width: 99%;
}
input.site-edit-email {
    width: 99%;
}
input.site-settings-number {
    width: 100px;
}
textarea.site-edit-message {
    width: 100%;
}
textarea.site-support-message {
    width: 100%;
    height: 250px;
}

@media (min-width: 768px) and (max-width: 991px) {
    input.site-edit-input,
    input.site-edit-password,
    input.site-edit-email {
        width: 100%;
        max-width: 400px;
    }

    textarea.site-edit-message,
    textarea.site-support-message {
        width: 100%;
        max-width: 500px;
    }
}

a.site-settings-link {
    text-decoration: none;
}

/* =================== */
/* TEXT ELEMENTS */
/* =================== */
span.error-msg {
    color: red;
}
span.success-msg {
    color: limegreen;
}
span.note {
    font-style: italic;
    font-size: small;
    color: gray;
}
span.site-footer {
    font-size: small;
}
span.mono-text {
    font-family: monospace;
}
span.bold-text {
    font-weight: bold;
}

/* API Key tokens with responsive sizing */
span.api-key-token {
    font-family: monospace;
    font-size: 0.75rem;
    background-color: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: break-word;
}

@media (min-width: 576px) {
    span.api-key-token {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    span.api-key-token {
        font-size: 0.875rem;
        word-break: normal;
    }
}

@media (min-width: 992px) {
    span.api-key-token {
        font-size: 1rem;
    }
}

/* =================== */
/* VERIFICATION INDICATORS */
/* =================== */
.site-verified-header svg {
    margin-bottom: 14px;
    color: blue;
}
.site-verified-text svg {
    color: green;
}
.site-verified-ind {
    visibility: hidden;
}
.site-verified-address {
    visibility: visible;
}
.site-verified-email {
    visibility: visible;
}
.site-verified-phone {
    visibility: visible;
}

/* =================== */
/* CHARTS */
/* =================== */
div.chart-container {
    width: 100%;
    height: 480px;
}

canvas.api-usage-chart {
    width: 100%;
    height: 100%;
}

@media (max-width: 991px) {
    div.chart-container {
        height: 360px;
    }
}

@media (max-width: 767px) {
    div.chart-container {
        height: 280px;
    }
}

/* =================== */
/* LEGACY HISTORY TABLES */
/* =================== */
div.hidden-dialog {
    display: none;
}
table.snap-history-table {
    width: 100%;
}
table.history-item-table img.history-thumbnail {
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
    border-radius: 5px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

@media (max-width: 991px) {
    table.history-item-table img.history-thumbnail {
        min-width: 48px;
        min-height: 48px;
        max-width: 48px;
        max-height: 48px;
    }

    table.history-item-table td.history-item-details-labels,
    table.history-item-table td.history-item-details-values {
        font-size: 0.8rem;
        line-height: 14px;
    }
}

table.history-item-table td.history-item-thumb {
    text-align: center;
    padding-right: 8px;
}
table.history-item-table td.history-item-details-labels {
    padding-right: 4px;
    text-align: left;
    line-height: 16px;
    vertical-align: center;
    font-weight: bold;
    font-size: small;
}
table.history-item-table td.history-item-details-values {
    padding-right: 8px;
    text-align: left;
    line-height: 16px;
    vertical-align: center;
    font-weight: normal;
    font-size: small;
}
table.history-item-table td.history-item-details {
    text-align: left;
    line-height: 16px;
    vertical-align: center;
}
table.history-item-table td.history-item-details-tags {
    text-align: right;
    vertical-align: top;
}
table.history-item-table td.history-item-details-links {
    height: 100%;
    width: 60%;
    vertical-align: middle;
    position: relative;
    line-height: 16px;
    font-weight: normal;
    font-size: small;
    border-left: solid;
    border-left-color: lightgray;
    border-left-width: thin;
}
table.history-item-table td.history-item-details-links span.item-tags {
    margin-left: 4px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: left;
}
table.history-item-table td.history-item-details-links span.item-links {
    margin-left: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: left;
}
table.history-item-table td.history-item-details-links span.primary-tag {
    color: #fff;
    background-color: #007bff;
}
table.history-item-table td.history-item-details-links a.copy-link {
    text-decoration: none;
    color: darkblue;
}
table.history-item-table td.history-item-details-links a.view-link {
    text-decoration: none;
    color: darkblue;
}
div.history-container .dataTables_filter, .dataTables_info {
    display: none;
}
div.history-container .dataTables_paginate a.page-link {
    font-size: small;
}
div.history-container .dataTables_length {
    font-size: small;
}

/* =================== */
/* CARD LAYOUT HISTORY */
/* =================== */

/* DataTable Configuration */
.card-layout-datatable table thead {
    display: none;
}

.card-layout-datatable table.dataTable tbody td {
    border: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

.card-layout-datatable table.dataTable tbody tr {
    border: none;
    display: block;
    width: 100%;
}

.card-layout-datatable table.dataTable tbody tr:hover {
    background-color: transparent;
}

.card-layout-datatable table {
    width: 100% !important;
    max-width: none !important;
    table-layout: fixed;
    margin: 0 !important;
}

.card-layout-datatable table,
.card-layout-datatable tbody,
.card-layout-datatable tr,
.card-layout-datatable td {
    display: table !important;
    width: 100% !important;
}

.card-layout-datatable td {
    display: table-cell !important;
}

.card-layout-datatable .dataTables_wrapper {
    width: 100% !important;
    max-width: none !important;
}

.card-layout-datatable .dataTables_filter input {
    margin-left: 0.5em;
}

/* Remove container padding for full-width cards */
.history-container {
    padding: 0 !important;
    margin: 0 !important;
}

.history-container .card-body {
    padding: 0 !important;
}

/* Card Wrapper */
.datatable-card-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 8px;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Card Column */
.card-column {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
}

/* History Cards */
.history-card {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
    width: 100% !important;
    max-width: none;
    margin: 0 0 8px 0;
}

.history-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.history-card .card-body {
    padding: 1.25rem !important;
}

/* Thumbnail Container */
.thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.format-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Tags and Badges */
.primary-tag {
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
    border: none;
    color: white;
    font-weight: 500;
}

.config-badge {
    background: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 1px;
    display: inline-block;
}

/* URL and Coordinate Display */
.url-display {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 0.8rem;
    word-break: break-all;
}

.coordinates {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    color: #004085;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
}

/* Action Buttons - Removed hover overlay */

/* Responsive Card Layout */
@media (min-width: 768px) {
    .history-card .row.g-3 {
        --bs-gutter-x: 2rem;
    }

    .history-card .col-5 {
        flex: 0 0 20%;
        max-width: 20%;
    }

    .history-card .col-7 {
        flex: 0 0 80%;
        max-width: 80%;
    }

    .history-card .card-body {
        padding: 1.5rem !important;
    }
}

/* Responsive Width Control */
@media (min-width: 768px) and (max-width: 991px) {
    .history-card {
        min-width: 700px !important;
    }
}

@media (min-width: 992px) {
    .history-card {
        min-width: 800px !important;
    }
}

@media (min-width: 1200px) {
    .history-card {
        min-width: 1000px !important;
    }
}

@media (max-width: 991px) {
    .history-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .history-card .col-5 {
        flex: 0 0 40%;
        max-width: 40%;
    }

    .history-card .col-7 {
        flex: 0 0 60%;
        max-width: 60%;
    }

    .config-badge {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}

@media (max-width: 576px) {
    .action-buttons {
        opacity: 1;
        top: 5px;
        right: 5px;
    }

    .format-badge {
        top: 5px;
        right: 5px;
        font-size: 0.65rem;
        padding: 1px 6px;
    }
}

/* =================== */
/* API DOCUMENTATION */
/* =================== */
.swagger-ui .topbar, .information-container, .scheme-container {
    display: none !important;
}
.swagger-ui .opblock .opblock-control-section {
    display: none !important;
}
.swagger-ui .response-controls {
    display: none !important;
}
.swagger-ui .parameter__in {
    display: none !important;
}
.swagger-ui .parameters .parameters-container .parameter__value,
.swagger-ui .parameters .parameters-container input,
.swagger-ui .parameters .parameters-container select,
.swagger-ui .parameters .parameters-container textarea {
    display: none !important;
}
.swagger-ui .parameters input,
.swagger-ui .parameters select,
.swagger-ui .parameters textarea {
    display: none !important;
}
.swagger-ui .parameters td > input,
.swagger-ui .parameters td > select,
.swagger-ui .parameters td > textarea {
    display: none !important;
}

table.api-doc-names-table {
    width: 100%;
}
table.api-doc-names-table td.api-name-label {
    width: 10%;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
}
table.api-doc-names-table td.api-name-value {
    text-align: left;
}
table.change-password-table {
    width: 100%;
}
table.change-password-table td.change-password-label {
    text-align: left;
    font-weight: bold;
    width: 10%;
}
table.change-password-table td.change-password-value {
    text-align: left;
}
table.curl-api-example {
    width: 100%;
}
table.curl-api-example td.code {
    font-family: monospace;
}
table.api-endpoint {
    width: 100%;
}
table.api-endpoint td.code {
    font-family: monospace;
}
