/* General button styling */
.main-button-wrapper .button {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 2px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #e0e0e0;
}

/* Report Submission Section */
.report-website-wrapper  {
    margin-top: 20px;
    margin-bottom: 30px;
}

.main-button-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.report-button {
    min-width: 100px;
    color: #fff;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 2px;
}

.report-button:hover {
    background-color: #005177;
}

.report-button.website-up {
    background-color: #4caf50;
}
.report-button.website-up:hover {
    background-color: #45a049;
}

.report-button.website-not-loading {
    background-color: #f44336;
}
.report-button.website-not-loading:hover {
    background-color: #da190b;
}

.report-button.website-error {
    background-color: #ff9800;
    border-color: #ff9800;
}
.report-button.website-error:hover {
    background-color: #e68a00;
    border-color: #e68a00;
}

.report-button.website-login-problem {
    background-color: #2196f3;
    border-color: #2196f3;
}
.report-button.website-login-problem:hover {
    background-color: #0b7dda;
    border-color: #0b7dda;
}

.report-button.other-issues {
    background-color: #9c27b0;
    border-color: #9c27b0;
}
.report-button.other-issues:hover {
    background-color: #7b1fa2;
    border-color: #7b1fa2;
}

.other-button-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    line-height: 1;
    display: none;
}

.btns {
    background-color: #607d8b; /* Blue Grey */
    color: #fff;
    border-color: #607d8b;
}

.btns:hover {
    background-color: #455a64;
    border-color: #455a64;
}

/* Report Graph Section */
.chart-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 2px;
    background-color: #fdfdfd;
}

.bar {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.bar-label {
    width: 130px;
    font-weight: 500;
    margin-right: 10px;
    color: #000000;
	font-size: 15px;
}

.bar-background {
    flex-grow: 1;
	width: 100%;
    height: 35px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden; /* Ensure fill stays within bounds */
}

.bar-fill {
    height: 100%;
    width: var(--bar-width, 0%); /* Use CSS variable for width */
    background-color: #4caf50; /* Default color */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding-right: 5px;
    box-sizing: border-box;
    transition: width 0.5s ease-in-out;
}

.bar-fill::after {
    content: attr(data-percentage) "%"; /* Display percentage from data attribute */
	color: #000000;
	font-size: 10px;
}

/* Specific bar colors are set inline in PHP, but keeping these for reference/defaults */
.bar-fill-website-up {
    background-color: #62ee62;
}
.bar-fill-not-loading {
    background-color: #ff5533;
}
.bar-fill-error {
    background-color: #ffbb33;
}
.bar-fill-login-problem {
    background-color: #33ffcc;
}
.bar-fill-other-issues {
    background-color: #ff33ff;
}

/* Report Data History Section */
.report-history-data {
    margin-top: 20px;
    padding: 15px 20px;
    border: 1px solid #eee;
    border-radius: 2px;
    background-color: #fdfdfd;
}

.report-item-wrapper {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

.report-item-wrapper:last-child {
    border-bottom: none;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.report-item-content {
    flex: 1;
    margin-right: 10px;
    font-size: 15px;
    color: #333;
}


.report-item-content strong {
    font-weight: 600 !important;
}

.report-item-status {
    flex-shrink: 0;
    display: flex;
    gap: 5px;
    margin-top: 5px; /* Adjust for wrap */
}

.status-span {
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
    color: #fff;
    text-transform: capitalize;
}

.report-status {
    background-color: #0073aa; /* Default status color */
}

.site-status {
    background-color: #666; /* Grey for site status */
}

.aioc_site_up {
    background-color: #4caf50; /* Green */
    padding: 1px 15px;
}

.aioc_site_down {
    background-color: #f44336; /* Red */
}

.report-time {
    font-size: 11px;
    color: #555555;
  }

.report-time-data {
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-button-wrapper,
    .other-button-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .report-button,
    .btns {
        width: 90%;
        max-width: 250px;
    }
    .bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .bar-label {
        width: 100%;
        margin-bottom: 5px;
    }
    .report-item {
        flex-direction: column;
    }
    .report-item-content {
        margin-right: 0;
        margin-bottom: 5px;
    }
    .report-item-status {
        width: 100%;
        justify-content: flex-start;
    }
    .report-time {
        text-align: left;
    }
}