.message {
    background: #F5F5F5;
    border: 1px solid #DDD;
    border-radius: 4px;
    display: block;
    margin: 15px 0;
    padding: 15px;
    text-align: center;
    font-size: .83333rem;
    line-height: 1.16667rem;
}

.message--success {
    background: #E8F5E8;
    border-color: #9DBA56;
    color: #6F8E3A;
}

.message--error {
    background: #F5E8E8;
    border-color: #BA5656;
    color: #BA5656;
}

/* Table totals row styling - override tfoot padding:0 rule */
.table__totals td {
    font-weight: bold;
    border-top: 2px solid #ddd;
}

@media (max-width: 980px) {
    .table__totals td {
        padding: 11.5px 10px !important;
    }
}

@media (min-width: 981px) {
    .table__totals td {
        padding: 15px !important;
    }
}

/* Header logo background fix */
.header__logo {
    background: white;
    padding: 8px;
    display: inline-block;
}

/* Disk usage gauge */
.header__account__disk {
    display: inline-block;
    padding-left: 30px;
}

@media (max-width: 640px) {
    .header__account__disk {
        display: none;
    }
}

.header__account__consumed {
    border-radius: 4.5px;
    border: 1px solid #FFF;
    display: inline-block;
    height: 6px;
    overflow: hidden;
    vertical-align: middle;
    width: 90px;
    background: transparent;
}

.header__account__consumed__bar {
    background: #FFF;
    display: block;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* Server Action Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.59);
    backdrop-filter: blur(7.2px);
    -webkit-backdrop-filter: blur(7.2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}


.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.09);
    position: relative;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: bold;
}

.modal-description {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.modal-body {
    margin-bottom: 25px;
    color: #333;
}

.modal-loading {
    text-align: center;
    padding: 20px 0;
}

.modal-loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #9dba56;
    border-right: 3px solid #9dba56;
    border-radius: 50%;
    animation: spin 0.8s ease-in-out infinite;
    margin-right: 12px;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(157, 186, 86, 0.3);
}

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

.modal-result {
    text-align: center;
    padding: 20px 0;
}

.modal-result.success {
    color: #6F8E3A;
}

.modal-result.error {
    color: #BA5656;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-btn-cancel:hover {
    background: #e8e8e8;
}

.modal-btn-confirm {
    background: #9dba56;
    color: white;
}

.modal-btn-confirm:hover {
    background: #8ba347;
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666 !important;
    border: 1px solid #bbb !important;
}

/* Sites forms - hidden by default */
.wordpress-form {
    display: none;
}

.php-form {
    display: none;
}

.static-form {
    display: none;
}

/* Login URL loading spinner */
.login-cell .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e8e8e8;
    border-top: 2px solid #9dba56;
    border-right: 2px solid #9dba56;
    border-radius: 50%;
    animation: spin 0.8s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 0 4px rgba(157, 186, 86, 0.2);
}

/* Hide edit button by default using opacity, show on hover - only for login edit buttons */
.login-cell .action--notext:not(.action--edit-ads):not(.action--edit-robots) {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.login-cell:hover .action--notext:not(.action--edit-ads):not(.action--edit-robots) {
    opacity: 1;
}

/* Disabled edit buttons (for PHP errors) never show */
.login-cell .action--notext.disabled {
    opacity: 0 !important;
}

.login-cell:hover .action--notext.disabled {
    opacity: 0 !important;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
        border-top-color: #9dba56;
        border-right-color: #9dba56;
    }
    50% {
        border-top-color: #8ba347;
        border-right-color: #8ba347;
    }
    100% { 
        transform: rotate(360deg); 
        border-top-color: #9dba56;
        border-right-color: #9dba56;
    }
}

/* SSL status icon in all tables - remove pointer cursor */
.ssl-cell .action--resource {
    cursor: default;
    pointer-events: none;
}

/* SSL add button hover effects - now handled by main file editor styling */

/* Operations cell styling */
.operations-cell {
    white-space: nowrap;
}

.operations-cell .action {
    margin-right: 8px;
}

.operations-cell .action:last-child {
    margin-right: 0;
}

/* File editor icons styling - hidden by default, show on cell hover */
.action--edit-ads,
.action--edit-robots,
.action--add-ssl,
.action--download {
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: -6px !important;
    margin-right: -6px !important;
}

.operations-cell:hover .action--edit-ads,
.operations-cell:hover .action--edit-robots,
.operations-cell:hover .action--add-ssl,
.operations-cell:hover .action--download {
    opacity: 1;
}

.action--edit-ads:hover,
.action--edit-robots:hover,
.action--add-ssl:hover {
    opacity: 0.8 !important;
}



/* Utility classes for common inline styles */
.text-center { text-align: center; }
.text-right { text-align: right; }
.display-none { display: none; }
.display-block { display: block; }
.color-error { color: #BA5656; }
.color-muted { color: #666; }
.margin-top-15 { margin-top: 15px; }
.margin-bottom-15 { margin-bottom: 15px; }
.font-small { font-size: 0.85rem; }

/* Fix list spacing in content areas to match paragraphs */
.content__text ul,
.content__text ol {
    margin: 30px 0;
}

/* Tasks page styling */
#no-tasks-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

#tasks-table-container {
    transition: opacity 0.3s ease;
}

.table--tasks {
    width: 100%;
}

.table--tasks td:last-child {
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
}

/* Error message in tasks table */
.table--tasks .error-message {
    color: #BA5656;
    display: block;
    max-width: 280px;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Override status class to show text in tasks table */
.table--tasks .status {
    font-size: 0.83rem;
    line-height: 1.16rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.table--tasks .status::before {
    content: "";
    background: inherit;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* Form field validation styling */
.form__text--valid {
    border-color: #9DBA56 !important;
    box-shadow: 0 0 0 2px rgba(157, 186, 86, 0.2);
}

.form__text--invalid {
    border-color: #BA5656 !important;
    box-shadow: 0 0 0 2px rgba(186, 86, 86, 0.2);
}

/* Form status area in footer */
.form-status-area {
    font-size: 0.83rem;
    line-height: 1.2;
    vertical-align: middle;
    min-height: 1.5em;
}

@media (max-width: 980px) {
    .form-status-area {
        padding: 11.5px 10px !important;
    }
}

@media (min-width: 981px) {
    .form-status-area {
        padding: 15px !important;
    }
}

.form-status--success {
    color: #6F8E3A !important;
}

.form-status--error {
    color: #BA5656 !important;
}

/* Login button override to match OK status color */
.wrapper--login .form__button {
    background: #9DBA56;
}

.wrapper--login .form__button:hover {
    background: #8BA347;
}

/* Override fixed table widths from style.css to make tables fluid */
.table--sites tr > :first-child,
.table th[colspan="2"], 
.table td[colspan="2"],
.table--2-cols th, 
.table--2-cols td,
.table--3-cols th, 
.table--3-cols td,
.table--4-cols th, 
.table--4-cols td {
    width: auto !important;
}

/* Let tables adapt naturally to content */
.table {
    table-layout: auto !important;
}

.table th,
.table td {
    width: auto !important;
}