html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    display: flex;
}

.status-not_started { color: gray; }
.status-in_progress { color: blue; }
.status-success { color: green; }
.status-failure { color: red; }
.status-stopped { color: black; }

.site-wrapper {
    width: 100%;
    margin-top: 30px;
}

h1 {
    text-align: center;
    color: #333;
}

.center {
    text-align: center;
}

#logo {
    width: 400px;
    max-width: 90%;
}

.test-case {
    margin-bottom: 20px;
    padding: 10px;
    border-left: 4px solid #ccc;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.test-case-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.step {
    margin-left: 20px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fefefe;
    margin-bottom: 5px;
}

.status {
    margin-right: 10px;
}

.page-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 20px;
}

.menu {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 20px;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.menu li {
    margin: 0 10px;
}

.menu a:link, .menu a:visited {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.menu a:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

.menu a.current {
    background-color: #e0e0e0;
    color: #000;
}

.menu a.active {
    background-color: #4CAF50;
    color: white;
}

.test-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

#test-case-container {
    width: 50%;
    border: 1px solid #ccc;
    border-radius: 10px;
    position: relative;
    width: 50%;
    aspect-ratio: 16/10;
    overflow: auto;
}

#browser-view {
    border-radius: 10px;
    position: relative;
    width: 50%;
    padding-bottom: calc(50% * 0.625); /* Maintain 768x480 aspect ratio relative to 50% width */
    height: 0;
    overflow: hidden;
    background: #ddd;
    border: 1px solid #aaa;
}

#browser-view iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.disable-interaction {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

button,
.button,
a:link.button,
a:visited.button {
    background-color: #2f363e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.wide-button {
    width: 100%;
}

button:hover,
.button:hover {
    background-color: #3c434a;
}

button.blue,
.button.blue {
    background-color: #1a63b8;
}

button.blue:hover,
.button.blue:hover {
    background-color: #2f73c2;
}

button.green,
.button.green {
    background-color: #28a745;
}

button.green:hover,
.button.green:hover {
    background-color: #218838;
}

a:link, a:visited {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:link.green, a:visited.green {
    color: #28a745;
}

a:link.green:hover, a:visited.green:hover {
    color: #218838;
}

.red, a:link.red, a:visited.red {
    color: #d9534f;
}

.trial-banner {
    background-color: #777777;
    color: #ffffff;
    padding: 5px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-size: 0.9em;
}

.trial-banner a:link,
.trial-banner a:visited {
    color: #ffffff;
    text-decoration: underline;
}

.badge {
    background-color: #007bff;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
    position: relative;
    top: -1px;
}

.badge.admin {
    background-color: #f0ad4e;
}

.badge.expired {
    background-color: #eb2f2f;
}

.action-button {
    background-color: #fff;
    border: 1px solid #007bff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.disabled {
    background-color: #aaa !important;
    cursor: not-allowed !important;
}

#stop {
    background-color: #ff4d4d;
    cursor: pointer;
}

#test-suite-file {
    display: none;
}

#test-case-container .note {
    position: absolute;
    top: 0;
    left: 0;
    text-align: center;
    color: #666;
    font-style: italic;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#test-case-container .loading {
    display: none;
}

.current-step {
    background-color: #dfeaff;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #333;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: -15px;
}

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

.spinner.white {
    border-left-color: #fff;
}

.starting-browser,
.browser-placeholder {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    background: #000;
    color: #fff;
}

.browser-placeholder {
    display: flex;
    font-style: italic;
}

.alert {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 18px rgb(0 0 0 / 34%);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 15px;
}

.alert p {
    margin: 0;
    color: #333;
}

.alert button {
    background: #2f363e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.alert button:hover {
    background: #3c434a;
}

.alert .buttons {
    display: flex;
    gap: 10px;
}

.close-alert {
    font-size: 16px;
}

/* Table Styles */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #ddd;
}

tr {
    border: 1px solid #ddd;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    border-collapse: collapse;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

td {
    background-color: #fff;
}


.flash-message {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

@media (max-width: 1000px) {
    .test-wrapper {
        flex-direction: column;
    }
    #browser-view {
        padding-bottom: calc(100% * 0.625); /* Maintain 768x480 aspect ratio relative to 100% width */
    }
    #test-case-container, #browser-view {
        width: 100%;
    }
}



/* Login Page Styles */

#logo.small-logo {
    width: 256px;
    margin-bottom: 10px;
}

.login-form {
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    margin: 0 auto;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333333;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #444;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-group input:focus {
    border-color: #28a745;
    outline: none;
}

button {
    padding: 0.75rem;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-message {
    margin-bottom: 2rem;
    color: #d9534f;
    text-align: center;
    font-weight: bold;
}

.small-info {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #666;
}

.hidden,
.hidden2 {
    display: none;
}

input[type="date"] {
    max-width: 170px;
}

.subscription-plans {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-top: 40px;
    margin-bottom: 40px;
}

.plan {
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    flex: 1 1 calc(25% - 15px);
}

.plan h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    margin-top: 0;
}

.plan ul {
    list-style: none;
    padding: 0;
    min-height: 150px;
}

.plan li {
    margin: 5px 0;
}

.plan li:before {
    content: "- ";
}

.plan .price {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0;
}

@media (max-width: 990px) {
    .subscription-plans {
        justify-content: center;
    }
    .plan {
        flex: 1 1 calc(50% - 15px);
    }
}

@media (max-width: 560px) {
    .plan {
        flex: 1 1 100%;
    }
}
