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

/* --- General & Body --- */
body {
    font-family: 'Inter', sans-serif;
    /* background-color: #f9fafb; */ /* gray-50 */
    color: #374151; /* gray-700 */
    margin: 0;
    /* padding: 1rem; */
}


.container {
    max-width: inherit; /* max-w-2xl */
    /* margin: 0 auto; */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    width: min-content;
    min-width: 10px;
    align-items: center;
    width: 55vw;
}

/* --- Header & Footer --- */
header, footer {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    color: #ff00ef; /* gray-800 */
}

header p, footer p {
    color: #4b5563; /* gray-600 */
    margin-top: 0.5rem;
}

footer {
    margin-top: 2rem;
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* gray-500 */
}

/* --- Controls --- */
.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    max-width: fit-content;
    flex-direction: column;
    /* align-content: center; */
    align-items: center;
    width: 100%;
}

#refresh-button {
    /* padding: 1.75rem 16.5rem; */
    font-weight: 600;
    color: white;
    background-color: #b833f5; /* indigo-600 */
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    height: 10vh;
    width: 37vw;
}

#refresh-button:hover {
    background-color: #ff00ef; /* indigo-700 */
}

#refresh-button:disabled {
    background-color: #fa000057; /* gray-400 */
    -webkit-animation: pulse 2.5s ease-in-out 1s infinite;
    cursor: not-allowed;
}

/* --- Status List --- */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* space-y-4 */
    align-content: space-around;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: stretch;
    flex-flow: column;
}


div#statwrap {
    display: flex;
    width: 3vw;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    flex-direction: row-reverse;
    align-items: stretch;
}

div#buttoncontainer {
    display: flex;
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}


.status-card {
    display: flex;
    padding: 1.5rem;
    border-radius: 5.5rem;
    border: 10px solid;
    box-shadow: 0 1px 20px 2px rgb(102 102 102);
    transition: all 0.3s ease;
    flex-wrap: wrap;
    align-content: space-around;
    justify-content: space-around;
}

.status-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-card-title {
    display: flex;
    gap: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: space-between;
    justify-content: space-evenly;
    align-items: stretch;
}

.status-card-name {
    display: flex;
    font-size: 1.125rem; /* text-lg */
    font-weight: 900;
    align-content: stretch;
    flex-direction: column-reverse;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
}

.status-card-status {
    display: flex;
    /* left: 20vh; */
    /* padding-left: 15vw; */
    font-size: 0.875rem; /* text-sm */
    font-weight: 700;
    /* flex-direction: row-reverse; */
    width: 10vw;
    flex-wrap: wrap;
    align-content: space-between;
    justify-content: flex-end;
    align-items: flex-end;
}

.status-card-footer {
    display: flex;
    text-align: center;
    font-size: 0.90rem; /* text-xs */
    color: #6b7280; /* gray-500 */
    margin-top: 0.5rem;
    flex-direction: column;
    align-content: space-between;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    padding-left: 1vw;
}

/* --- Status Indicators --- */
.status-indicator {
    display: flex;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: stretch;
    justify-content: space-evenly;
    align-items: stretch;
}

.indicator-online { background-color: #22c55e; /* green-500 */ }
.indicator-offline { background-color: #ef4444; /* red-500 */ }
.indicator-checking { 
    background-color: #9ca3af; /* gray-400 */
    animation: spin 1s linear infinite;
}

/* --- Status Card Colors --- */
.status-online {
    background-color: #16281c; /* green-100 */
    color: #166534; /* green-800 */
    border-color: #1d8241; /* green-400 */
    /* animation: auto; */
}

.status-offline {
    background-color: #470000c4; /* red-100 */
    color: #991b1b; /* red-800 */
    border-color: #fca5a5; /* red-400 */
    animation: pulse 4.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) 2s infinite;
}

.status-checking {
    background-color: #8c8c8c; /* gray-100 */
    color: #1f2937; /* gray-800 */
    border-color: #666666; /* gray-400 */
    animation: pulse 50s cubic-bezier(0.78, 0.13, 0.26, 0.88) infinite;
}

/* --- Animations --- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
