/** B : Global ****************************************************************/

@import url('https://fonts.googleapis.com/css?family=Raleway:400,700');

* {
    font-family: Raleway;
}

body {
    margin: 18px;
    background-image: var(--partner-background-image);
    background-color: var(--partner-background-color);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
}

#content,
#main {
    width: 1px;
    min-width: 100%;
    *width: 100%;
    height: 94vh;
}

#barometerFrame,
#cmapFrame {
    width: 1px;
    min-width: 100%;
    width: 100%;
    height: 87vh;
}

button,
a.btn {
    padding: 14px 20px;
    border-radius: 30px;
    text-transform: uppercase;
    border: none;
    margin: 20px 6% 0px 6%;
    font-size: 14px;
    line-height: 26px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}
button {
    min-width: 210px;
}

/** E : Global ****************************************************************/

#content {
    background: white;
}

#content #menu,
#content #score,
#content #results,
#content #benchmark,
#content #main,
#content #barometer,
#content #cmap,
#content #details,
#content #levels {
    display: none;
}
#content.test #main,
#content.results #menu,
#content.results #score,
#content.results #results,
#content.benchmark #menu,
#content.benchmark #score,
#content.benchmark #benchmark,
#content.barometer #barometer,
#content.barometer #menu,
#content.cmap #cmap,
#content.cmap #menu,
#content.details #details,
#content.details #menu,
#content.levels #levels,
#content.levels #menu {
    display: block;
}

#menu {
    background: white;
    padding: 20px 10px;
    text-align: center;
    /* height: 10vh; */
}
#menu .separator {
    color: #dde4e8;
    display: none;
}
#menu .item {
    text-transform: uppercase;
    color: #777777;
    font-size: 14px;
    margin: 0 10px;
    padding: 4px 0;
    cursor: pointer;
}
#menu .item.active {
    color: var(--partner-secondary-color);
    border-bottom: 1px solid;
}

#menu #item_benchmark {
    display: none;
}

#results {
    background: white;
}

#score {
    background-image: url("img/score.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    width: 86%;
    padding: 20px;
    margin: auto;
    text-align: center;
    font-size: 20px;
    color: white;
}

#score .value {
    font-weight: bold;
}

#results .protocol {
    border-bottom: 1px solid #dde4e8;
    width: 86%;
    margin: auto;
    padding: 20px 10px 15px 10px;
    clear: both;
}

#results .result {
    float: right;
    text-align: right;
}

#results .result .value {
    font-weight: bold;
    font-size: 24px;
}

#results .result .unit {
    font-size: 12px;
}

#results .icon {
    float: left;
    width: 30px;
    height: 30px;
    margin: 5px 40px 10px 0;
}

#results .details p {
    margin-top: 0px;
    margin-bottom: 4px;
    font-size: 10px;
}

#results .details p.title {
    text-transform: uppercase;
    color: var(--partner-secondary-color);
    font-size: 14px;
}

#results .protocol-latency .details p.title {
    height: 30px;
    padding-top: 15px;
}

#results button span.icon {
    float: left;
    width: 26px;
    height: 26px;
    margin: 0px 10px 0px 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center; 
}


#compare {
    float: right;
    background-color: var(--partner-primary-color);
    color: white;
    display: none;
}

#compare span.icon {
    background-image: url("img/compare-white.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center; 
}

#compare:hover {
    background-color: var(--partner-secondary-color);
}


#share {
    display: none;
}

#share:hover {
    background-color: var(--partner-primary-color);
    color: white;
}

#share span.icon {
    background-image: url("img/share-black.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center; 
}

#share:hover span.icon {
    background-image: url("img/share-white.png");
}

#relaunch {
    background-color: var(--partner-background-color);
    color: white;
}


#relaunch:hover {
    background-color: var(--partner-background-color);
}

#relaunch span.icon {
    background-image: url("img/reload-white.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center; 
}

#button_actions {
    text-align: center;
}

.loader {
    border: 5px solid #f3f3f3;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    border-top: 5px solid #555;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 30px auto;
}

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

#benchmark_chart {
    overflow: hidden;
    text-align: left;
    width: 540px;
    max-width: 96%;
    height: 300px;
    margin: auto;
}

#benchmark_description {
    width: 540px;
    max-width: 96%;
    font-size: 11px;
    text-align: center;
    margin: auto;
    margin-top: -60px;
}

#benchmark_link {
    margin: 10px 25px;
}

#benchmark_link a.btn {
    border: 2px solid #dde4e8;
    color: black;
    width: 200px;
    margin: 5px 10px;
    line-height: 30px;
    padding: 10px 15px;
    text-decoration: none;
}

#benchmark_link a.btn span.icon {
    display: block;
    float: left;
    width: 30px;
    height: 30px;
    margin-left: 10px;
    margin-right: 0px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center; 
}


#benchmark_link a.btn:hover {
    border-color: var(--partner-secondary-color);
    color: var(--partner-secondary-color);
    font-weight: bold;
}

@media (max-width: 480px) {
    #score {
        padding: 5px 20px;
    }
    #results .icon {
        margin: 5px 10px 10px 0;
    }
    #benchmark_chart {
        height: 260px;
    }
    button,
    #benchmark_link a.btn {
        width: 88%;
    }
    #benchmark_link a.btn {
        margin: 0px 0 5px 0px;
        padding: 5px 20px;
    }
}

@media (max-width: 320px) {
    #benchmark_chart {
        height: 200px;
    }
    #benchmark_link a.btn {
        padding: 2px 20px;
    }
}

#configuration-message {
    font-size: 25px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform:translate(-50%, -50%);
    color: #BC2D19;
}

.remote-ip-address {
    font-size: 15px;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 100px;
    text-align: center;
    width: 86%;
}

#details {
    width: 100%;
    max-width: 640px;
    margin: -38px auto;
    padding: 20px;
    font-family: 'Raleway', sans-serif;
    box-sizing: border-box;
    background: white;
}
#details h1 {
    color: var(--partner-secondary-color, #F44336);
    margin: 20px 0;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    border-bottom: 1px solid #dde4e8;
    padding-bottom: 10px;
    text-align: center;
}
.details-block-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.details-block {
    display: flex;
    align-items: center;
    text-align: right;
    font-size: 12px;
    width: 32%;
    margin-bottom: 15px;
    overflow-wrap: break-word;
    word-break: break-word;
}
.details-icon {
    margin-right: 10px;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}
.details-value {
    font-size: 12px;
    font-weight: bold;
    color: var(--partner-primary-color, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.details-unit {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
}
#details_stream,
#details_web {
    width: 100%;
    text-align: left;
}
#details_stream .details-label,
#details_web .details-label {
    line-height: 1.6;
    font-size: 12px;
}
#details_environnement {
    margin-top: -35px;
    padding-top: 20px;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
}
#details_environnement h1 {
    color: var(--partner-secondary-color, #F44336);
    margin: 20px 0;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #dde4e8;
    padding-bottom: 10px;
    width: 100%;
}
#details_environnement .details-block {
    display: flex;
    justify-content: space-between;
    width: 48%;
    margin-bottom: 4px;
    overflow-wrap: break-word;
    word-break: break-word;
}
#details_environnement .details-block:nth-child(even) {
    justify-content: flex-end;
}
.details-label {
    text-align: left;
    font-weight: normal;
    flex: 1;
}

/* Levels Block */
#levels {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 20px auto;
    width: 100%;
    max-width: 800px;
}
/* Center-aligned tab menu */
#level {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 10px 0;
    font-family: 'Raleway', sans-serif;
}
/* Tab items */
.tab-item {
    position: relative;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #777;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
}
/* Hover effect */
.tab-item:hover {
    color: var(--partner-primary-color);
}
/* Active tab */
.tab-item.active {
    color: var(--partner-primary-color);
    border-bottom: 1px solid;
}
/* Iframe styling */
.tab-content iframe {
    width: 100%;
    height: 600px;
    padding-left: 10px;
    overflow: auto;
}
.levels {
    height: 100%!important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #level .tab-item {
        /* Smaller font size for smaller screens */
        font-size: 12px;
        /* Reduced padding */
        padding: 4px 8px;
    }
    .tab-content iframe {
        /* Make iframe occupy more width on smaller screens */
        max-width: 90%;
        /* Reduce iframe height */
        height: 300px;
    }
}
@media (max-width: 480px) {
    #level {
         /* Stack tabs vertically on very small screens */
        flex-direction: column;
        /* Minimal gap between stacked tabs */
        gap: 10px;
    }
    .tab-content iframe {
        /* Full width for very small screens */
        max-width: 100%;
        height: 250px;
    }
}
/* Block Ends */

/* Responsive adjustments */
@media (max-width: 768px) {
    .details-block {
        width: 48%;
        margin-bottom: 15px;
    }
    #details_environnement .details-block {
        justify-content: space-between;
    }
    #details {
        width: 100%;
        max-width: 768px;
    }
}
@media (max-width: 480px) {
    .details-block {
        width: 100%;
        justify-content: flex-start;
    }
    .details-icon {
        width: 20px;
        height: 20px;
    }
    .details-label, .details-value {
        font-size: 11px;
    }
    #details h1, #details_environnement h1 {
        font-size: 13px;
    }
    #details_stream .details-label, #details_web .details-label {
        font-size: 11px;
        line-height: 1.4;
    }
    #details_environnement {
        flex-direction: column;
    }
    #details_environnement .details-block {
        width: 100%;
        justify-content: space-between;
    }    
}

.inline-block-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

