@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base styles */
body {
    font-family: 'Inter', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #F8FAFC;
    margin: 0;
    padding: 24px;
    padding-top: 90px;
}

.container {
    width: auto;
    max-width: 902px;
    background: white;
    padding: 32px;
    border-radius: 32px;
    border: 1px solid #E2E8F0;
    margin: 0 auto;
    box-sizing: border-box;
}

#diagnostic-tests {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    width: 100%;
    box-sizing: border-box;
}

/* Header styles */
header {
    width: 100%;
    height: 50px;
    padding: 10px;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: white;
    border-bottom: 1px solid #E2E8F0;
}

.logo {
    position: absolute;
    top: 20px;
    left: 20px;
}

.logo img {
    height: 40px;
}

/* Test box styles */
.test-box {
    width: 100%;
    padding: 0;
    margin: 0;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    color: #0F172A;
    position: relative;
    font-family: 'Inter';
    font-weight: 500;
    font-size: 15px;
    line-height: 24px;
    transition: all 0.2s ease;
    background: linear-gradient(270deg, #EFF6FF 0%, #FFFFFF 100%);
    box-sizing: border-box;
    overflow: hidden;
}

.grey { 
    background: linear-gradient(270deg, #F8FAFC 0%, #FFFFFF 100%);
    border: 1px solid #E2E8F0;
}
.yellow { 
    background: linear-gradient(270deg, #FFFBEB 0%, #FFFFFF 100%);
    border: 1px solid #FEF3C7;
    color: #92400E;
}
.green { 
    background: linear-gradient(270deg, #F0FDF4 0%, #FFFFFF 100%);
    border: 1px solid #BBF7D0;
    color: #166534;
}
.red { 
    background: linear-gradient(270deg, #FEF2F2 0%, #FFFFFF 100%);
    border: 1px solid #FEE2E2;
    color: #991B1B;
}

/* Copy button styles */
.copy-button {
    position: absolute;
    top: 15px;
    right: 32px;
    padding: 12px 24px;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: #2563EB;
}

/* Title styles */
h1 {
    font-family: 'Inter';
    font-weight: 600;
    font-size: 32px;
    line-height: 46px;
    text-align: center;
    color: #0F172A;
    margin: 0;
}

/* Tooltip and fix icon styles */
.tooltip-icon {
    display: none; /* Hidden by default */
}

.test-box.red .tooltip-icon {
    display: inline-flex; /* Show when test box has red status */
}

.fix-icon {
    background: white;
    color: #3B82F6;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fix-icon:hover {
    background: #EFF6FF;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #FFFFFF;
    margin: 15% auto;
    padding: 32px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content button {
    margin: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.modal-content .link-button {
    background: #3B82F6;
    color: white;
}

.modal-content .link-button:hover {
    background: #2563EB;
}

.modal-content .ok-button {
    background: #F1F5F9;
    color: #475569;
}

.modal-content .ok-button:hover {
    background: #E2E8F0;
}

/* Subtext styles */
.subtext {
    margin-top: 24px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: #475569;
}

.subtext a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.subtext a:hover {
    color: #2563EB;
    text-decoration: underline;
}

/* Popup styles */
#CTupgradeGetAnswerPopup {
    display: inline-block;
    position: fixed;
    bottom: 24px;
    left: 24px;
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(32, 33, 36, 0.28);
    font-family: 'Inter', sans-serif;
    width: 285px;
    box-sizing: border-box;
    animation: grow 0.5s forwards;
}

@keyframes grow {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shrink {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0);
        opacity: 0;
    }
}

#CTupgradeGetAnswerPopup p {
    color: #0F172A;
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 20px 0;
}

#CTupgradeGetAnswerPopup button {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

#CTupgradeGetAnswerPopup button#subBtn {
    background-color: #F1F5F9;
    color: #475569;
}

#CTupgradeGetAnswerPopup button#subBtn:hover {
    background-color: #3B82F6;
    color: white;
}

#closeIcon {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #64748B;
    transition: color 0.2s ease;
}

#closeIcon:hover {
    color: #0F172A;
}

/* Responsive styles */
@media (max-width: 768px) {
    body {
        padding: 16px;
        padding-top: 80px;
    }

    .container {
        padding: 24px;
        border-radius: 24px;
    }

    h1 {
        font-size: 26px;
        line-height: 32px;
    }

    .test-box {
        padding: 16px 20px;
        font-size: 14px;
        line-height: 20px;
    }

    .copy-button {
        top: 24px;
        right: 24px;
        padding: 10px 20px;
        font-size: 13px;
    }

    #CTupgradeGetAnswerPopup {
        display: none;
    }

    .modal-content {
        padding: 24px;
        margin: 20% auto;
    }
}

/* Add larger screen optimization */
@media (min-width: 1200px) and (max-width: 1600px) {
    .container {
        max-width: 700px;
    }
}

/* Update test box inner content */
.test-box > div {
    align-items: center;
    gap: 8px;
}

/* Update test box styles */
.test-box {
    width: 100%;
    padding: 0;
    margin: 0;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    color: #0F172A;
    position: relative;
    font-family: 'Inter';
    font-weight: 500;
    font-size: 15px;
    line-height: 24px;
    transition: all 0.2s ease;
    background: linear-gradient(270deg, #EFF6FF 0%, #FFFFFF 100%);
    box-sizing: border-box;
    overflow: hidden;
}

.test-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

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

.test-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chevron-button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #64748B;
    transition: transform 0.3s ease;
}

.chevron-button:hover {
    color: #0F172A;
}

.chevron-button.active i {
    transform: rotate(180deg);
}

.test-details {
    padding: 0 24px 20px;
    margin-top: -8px;
    border-top: 1px solid #E2E8F0;
    background: rgba(255, 255, 255, 0.5);
    display: none;
}

.test-details .details-content {
    color: #475569;
    font-size: 14px;
    padding-top: 20px;
}

/* Update tooltip icon styles */
.tooltip-icon {
    display: none; /* Hidden by default */
}

.test-box.red .tooltip-icon {
    display: inline-flex; /* Show when test box has red status */
}

/* Update chevron animation */
.chevron-button i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.chevron-button.active i {
    transform: rotate(180deg);
}

/* Add animation for the test box when expanding */
.test-box {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.test-box.expanded {
    margin-bottom: 8px;
}

.test-status span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.test-status span i {
    font-size: 16px;
}

.test-status span i.fa-spinner {
    color: #F59E0B;
    font-size: 14px;
}

.yellow .test-status span {
    color: #92400E;
}

/* Extension test status visibility */
.test-box .extension-test-status {
    display: none;
}

.test-box.red .extension-test-status.error {
    display: flex;
}

.test-box.green .extension-test-status.success {
    display: flex;
}

.support-cta {
    text-align: center;
    margin: 48px auto 0 auto;
    padding: 32px 24px;
    max-width: 600px;
    background: #F8FAFC;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
}

.support-cta p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1E293B;
    margin-bottom: 16px;
}

.support-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3B82F6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
}

.support-cta a:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.support-cta a:before {
    font-family: "Font Awesome 6 Free";
    content: "\f075";  /* comment icon */
    font-weight: 400;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .support-cta {
        margin: 32px auto;
        padding: 24px 20px;
    }

    .support-cta p {
        font-size: 16px;
    }
}