body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    background-color: rgb(233, 244, 255);
}

/* --- Nav ------------------------------------------------------------------ */

nav {
    background-color: #333333;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 5;    
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    padding: 1rem;
    margin-right: 1rem;
}

nav ul li a {
    display: inline;
    color: white;
    text-align: center;
    padding: 1rem;
    text-decoration: none;
}

nav ul li a:hover {
    background-color: #111111;
  }

.logo img{
    width:4rem;
    height:auto;
}

.logo{
    margin-left: 5%;
}

.logo_links{
    margin-left: 10%;
}

.logo_n_links{
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content:flex-start;     
}

/* --- Footer ------------------------------------------------------------------ */

footer {
    font-size: 1rem;
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 5;    
}

footer ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

footer ul li {
    display: inline;
    margin-right: 1em;
}

footer ul li a {
    color: white;
    text-decoration: none;
}

/* --- Container ------------------------------------------------------------------ */
.outer_space{
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

    margin-top: 7%;
    margin-bottom: 2%;
}

/* --- Auth ------------------------------------------------------------------ */

.outer_space{
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth{
    max-width: 500px;
    padding: 20px;
}

.auth_space{
    min-height: 100vh;
}

.login_menu{
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top:6rem;
    margin-bottom: 7rem;
}


.login_google a, .login_email a{
    width: 100%;
    padding: 0.7rem 0;
    font-size: larger;
    font-weight: 500;
    text-decoration: none;

    -moz-border-radius:13px;
    -webkit-border-radius:13px;
    border-radius:13px;
    text-shadow: 1px 1px 1px #111111;  
}

/* --- Errors ------------------------------------------------------------------ */
.errors_space{
    min-height: 100vh;
}

.errors_container{
    max-width: 500px;
    padding: 20px;
    text-align: center;
}


/* --- Other Spaces ------------------------------------------------------------------ */
.user_space{
    min-height: 100vh;
}

.user_container{
    max-width: 800px;
    padding: 20px;    
}

.index_space{
    min-height: 100vh;
    margin-left: 1rem;
    margin-right: 1rem;
}

.index_container, .carousel_container{
    max-width: 900px;
    padding: 20px;
}

.index_user_form{
    padding: 10px;
    max-width: 600px;
}

.index_user_table{
    margin-top: 1rem;
    padding: 5px;
}

.index_user_container{
    padding: 20px;
}

.index_user_container h4{
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.index_user_container h5{
    margin-top: 3rem;
}

.pricing_space{
    min-height: 100vh;
}

.pricing_container{
    padding: 20px;
}

.buy_container{
    padding: 20px;
}

.upgrade_space{
    min-height: 100vh;
}

.upgrade_container{
    padding: 20px;
}

.scan_graph_space{
    min-height: 100vh;
}

.scan_graph_container, .stats_container{
    padding: 20px;
}
/* --- Rest ------------------------------------------------------------------ */

h1 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

h4 {
    color: #333;
    margin-bottom: 1.75rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input, button {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button, #submit {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover, #submit:hover {
    background-color: #0056b3;
}

.error {
    color: red;
    margin-top: 10px;
}

.empty-box {
    height: 40vh;
    width: auto; 

    border: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
    background-color: #f9f9f9;
    gap:2rem;
}

.empty-box h5, .empty-box h6{
    margin: 1rem 1rem;
    text-align: center;
}
/* QR Display =================================================================================== */
.QR_display{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.hero{
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 6rem;
}

.myacco{
    margin-top: 10rem;
}

.my_qr_code{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;  
}

.my_qr_code img{
    width:15rem;
    height:auto;
}

.my_qr_code_link{
    text-align: center;
    max-width: 80%;
    overflow-wrap: break-word;
    margin-bottom: 1rem;
}

.index_container .my_qr_code{
    margin-top: 5rem;
}

.qr_example{
    width:2.5em;
    height:auto;
}

.two_buttons{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content:center;
}

.two_buttons a{
    margin: 0.3rem;
}


.confirm_cancel input{
    font-size: 1rem;
}
/* Hover magic - on hover show longer string
https://www.w3schools.com/w3css/default.asp
https://medium.com/@AbbasPlusPlus/how-to-truncate-a-string-and-make-it-appear-on-hover-in-react-html-css-882cf0fa5332
https://stackoverflow.com/questions/59286359/html-table-cut-off-long-text-and-show-full-text-on-hover-click
*/
.index_user_table table{
    width: 100%;
}

.submit_share input{
    padding: 0.375rem 3rem;
}

.index_user_table .truncate_html_link{
    max-width: 10rem;
    text-overflow: ellipsis;
    word-break: break-all;
    overflow: hidden;
    white-space: nowrap;
}

.index_user_table tr:hover > td {
    overflow: visible;
    white-space: normal;
}
.expiration_in_minutes{
    max-width: 15rem;
}

/* ------------------ Pricing ---------------------------------- */
.pricing-header {
    max-width: 700px;
}

.card-deck{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.card-deck .card {
    min-width: 210px;
    width: 100%;
    margin-left: 1rem;
    margin-right: 1rem;    
}

.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); }


/* ------------------ User profile ------------------------------- */

.user_profile{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;    
}

.avatar_last_seen{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;      
}

.user_profile_avatar{
    height: 10rem;
    width: auto;
}

.have_questions{
    margin-top: 1.5rem;
}

/* --- Stats Page -------------------------------------------------------------*/

.stats_hero{
    margin-top: 2rem;
}
.click-chart {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

 /* General Stats Card */
 .stats-card {
    margin-top: 3rem;
    background-color:  #e2e8f0; /* Dark background like the image */
    color:  #4a5568;/* Light text color */
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.stats-card h2, .click-chart h2 {
    border-bottom: none;
}

.stats-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.05em;
}
.stats-item strong {
    /* color: #a0aec0;  Lighter gray for labels */
    min-width: 10rem; /* Align labels */
    display: inline-block;
}
.stats-item .value {
    background-color: #eef1f5; /* #2d3748;  Slightly darker badge background */
    color: #6ea7f3;
    padding: 4px 10px;
    border-radius: 12px; /* Pill shape */
    font-family: monospace;
    font-size: 0.95em;
    margin-left: 10px;
    display: inline-block; /* Needed for padding/border-radius */
}
.stats-item .value.url { /* Special style for URLs */
     font-family: inherit;
     word-break: break-all;
     background-color: #eef1f5; /* Different background for URLs */
}
 .stats-divider {
     height: 1px;
     background-color: #718096; /* Separator line */
     margin: 20px 0;
     border: none;
}

/* Chart Container */
.chart-container {
    width: 100%;
    margin: 30px auto 20px auto; /* Add some bottom margin */
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    background-color: #fff; /* White background for chart */
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #3182ce;
}

/* World map */

/* Styles for the new Countries card and heatmap */
.map-card {
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative; /* Needed for fullscreen button positioning */
}        

.map-card h2 {
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.7rem;
}

#heatmapContainer {
    width: 100%;
    height: auto;       /* Adjust height as needed */
    border-radius: 5px;
    overflow: hidden;   /* Hide parts of map extending beyond border */
}


/* Styling for the map div itself (Plotly might override some) */
#heatmapChart .svg-container {
    color: #000;
}
.js-plotly-plot .plotly, .js-plotly-plot .plotly svg {
  background-color: transparent !important;
}

/* Fullscreen Button Styling */
#fullscreen-btn {
    position: absolute;
    top: 80px; /* Adjust position */
    left: 15px;
    background-color: rgba(45, 55, 72, 0.8); /* Semi-transparent dark */
    color: #e2e8f0;
    border: 1px solid #718096;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 1.2em;   /* Make icon larger */
    z-index: 10;        /* Ensure it's above the map */
    line-height: 1;
}

#fullscreen-btn:hover {
    background-color: rgba(74, 85, 104, 0.9);
}


/* Styles for when the map container is fullscreen */
#map-card-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 100% of viewport width */
    height: 100vh; /* 100% of viewport height */
    background-color: #4a5568;
    z-index: 1000; /* Ensure it's above everything */
    padding: 20px; /* Add some padding */
    box-sizing: border-box; /* Include padding in width/height */
    display: flex; /* Use flexbox for centering */
    flex-direction: column;
}
 
#map-card-fullscreen h2 { 
    margin: 0 0 15px 0;
    color: #bababa;
}

#map-card-fullscreen #heatmapContainer{
    height: 90vh; /* Explicitly set height, e.g., 85% of viewport height */
    width: 100%; /* Ensure it takes full width within padding */
    overflow: hidden; /* Hide internal overflows */
}

#heatmapChart{
    width: 100%;
    max-height: 70vh;
}

#map-card-fullscreen #heatmapChart {
    width: 100%;
    height: 100vh;
}

#map-card-fullscreen #fullscreen-btn {
    /* Adjust position/style for fullscreen */
    top: 5rem;
    left: 25px;
    font-size: 1.5em;
}

.modebar-group {
    padding-bottom: 10px !important;
}


/* ----------- Tops countries table ----------- */
.top_countries{
    margin-top: 3rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.top_countries_table{
    width: 70%;
}

.top_countries_table table {
    width: 100%; /* Makes the table span the full width of its container */
    border-collapse: collapse;
    margin: 20px auto;
}

.top_countries_table th, .top_countries_table td {
    border: 1px solid #ccc;
    padding: 8px;
}

.top_countries_table th:first-child, .top_countries_table td:first-child {
    text-align: left;
}

.top_countries_table th:nth-child(2), .top_countries_table td:nth-child(2) {
    text-align: center;
}

.top_countries_table th {
    background-color: #f4f4f4;
}

/* --------- Webpages page ------------------------------------------------------------*/

.webpages{
    min-height: 60vh;
    margin-top: 2rem;
    margin-bottom: 2rem;

    display: flex;
    align-items: center;
    justify-content: center;
}

.webpages .btn-info, .index_user_table .btn-info{
    --bs-btn-color: #fff;
}

.carousel_container button:hover{
    background-color: #bcdaf9;
}

.carousel-item img{
    max-height: 27rem;
}

.carousel-item img{
    margin-bottom: 4rem;
}
/* --------- Index page ------------------------------------------------------------*/

.accordion button:hover {
    background-color: #bcdaf9;
}

/* responsive Menu -----------------------------------------------------------------------------*/



.navbar-toggle {
    display: none; /* Initially hide the checkbox */
  }
  
  .navbar-toggle-label {
    display: none; /* Initially hide the label */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
  }
  
  .navbar-toggle-label span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #f9f2f2;
    margin: 5px 0;
    transition: all 0.3s ease;
  }
  

/* ----------------------------------------------------------------------------------*/

@media (max-width: 768px) {
    .card-deck {
        flex-direction: column;
        overflow: hidden;      
    }

    .outer_space{
        margin-top: 3rem;
        margin-bottom: 0.5rem;    
    }

    .move-down{
        margin-bottom: 1.5rem;
    }

    .index_user_table table tr th:nth-child(3),
    .index_user_table table tr td:nth-child(3) {
        display: none;
    }

    .webpages table tr th:nth-child(2),
    .webpages table tr td:nth-child(2) {
        display: none;
    }

    .webpages input{
        width: 15ch;
    }

    #heatmapChart{
        height: 20rem !important;
    }

    .top_countries {
        margin-top: 0;
    }


/* --- Small menu --- */
    .logo_links{
        margin-left: 0;
    }

    .logo_links {
        display: none; /* Initially hide the menu */
        position: absolute;
        top: 100%;      /* Position menu below the navbar */
        left: 0;
        width: 100%;
        background-color: #8d8d8d;
        text-align: center;  /* Center align the links */
        z-index: 10;      /* Ensure the menu is above other content */
    }

    .logo_links ul {
        flex-direction: column; /* Stack links vertically */
    }
    
    .logo_links li {
        margin: 0;
        padding: 14px 0;
        border-bottom: 1px solid #ccc; /* Add a separator between links */
    }

    .navbar-toggle-label {
        display: block; /* Show the label */
      }
    
      /* Target the menu when the checkbox is checked */
      #navbar-toggle:checked + .navbar-toggle-label span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
      }
    
      #navbar-toggle:checked + .navbar-toggle-label span:nth-child(2) {
        opacity: 0; /* Hide the middle line */
      }
    
      #navbar-toggle:checked + .navbar-toggle-label span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
      }
    
      #navbar-toggle:checked ~ .logo_links {
        display: block; /* Show the menu when the checkbox is checked */
    }

  }

/* ========================================================================================= */

