/* MainWP Component Styles */

/* MainWP Section */
#mainwp-section {
    margin-bottom: 2rem;
}

#mainwp-section .h4 svg {
    color: #007bff;
}

/* MainWP Statistics Cards */
.mainwp-stat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.mainwp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.mainwp-stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mainwp-stat-card .stat-icon.primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.mainwp-stat-card .stat-icon.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.mainwp-stat-card .stat-icon.success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.mainwp-stat-card .stat-icon.danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.mainwp-stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.mainwp-stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

/* Clickable Statistics Cards */
.mainwp-stat-card.clickable {
    cursor: pointer;
    position: relative;
}

.mainwp-stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.mainwp-stat-card.clickable .click-hint {
    font-size: 0.75rem;
    color: #007bff;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    font-weight: 500;
}

.mainwp-stat-card.clickable:hover .click-hint {
    opacity: 1;
}

/* Coming Soon card styling */
.mainwp-stat-card.coming-soon-card {
    position: relative;
    cursor: default;
    /* Add bottom padding to match clickable cards with hidden click-hint */
    padding-bottom: calc(1.5rem + 0.5rem + 1.125rem); /* 1.5rem base padding + 0.5rem margin + font height */
}

.coming-soon-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    padding: 0.5rem;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    transform: translateY(100%);
    z-index: 10;
    pointer-events: none;
}

.mainwp-stat-card.coming-soon-card:hover .coming-soon-overlay {
    opacity: 1;
    transform: translateY(0);
}

.coming-soon-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Modal adjustments for larger content */
.modal-xl .modal-dialog {
    max-width: 1140px;
}

.modal-fullscreen-lg-down .modal-dialog {
    max-width: 1400px;
}

.modal-body .table-responsive {
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

.modal-body .badge {
    font-size: 0.75rem;
}

/* Modal table improvements */
.modal-body .table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
}

.modal-body .table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

.modal-body .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Load more button styling */
#load-more-sites-btn,
#load-more-plugins-btn,
#load-more-sites-updates-btn {
    transition: all 0.2s ease-in-out;
}

#load-more-sites-btn:hover,
#load-more-plugins-btn:hover,
#load-more-sites-updates-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Sortable table headers */
.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease-in-out;
}

.sortable-table th.sortable:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.sortable-table th.sortable i {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
}

.sortable-table th.sortable:hover i {
    color: #007bff !important;
}

/* Sort indicator states */
.sortable-table th.sortable i.fa-sort-up {
    color: #007bff !important;
}

.sortable-table th.sortable i.fa-sort-down {
    color: #007bff !important;
}

/* Search containers in modals */
.search-container {
    position: relative;
}

.search-container input.form-control {
    padding-left: 2.25rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.search-container input.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-container::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
    pointer-events: none;
}

/* No search results styling */
.no-search-results {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

/* Section spacing improvements */
.modal-body .mb-5 {
    margin-bottom: 2.5rem !important;
}

/* Compact stat cards for modals */
.mainwp-stat-card.compact {
    padding: 1rem;
}

.mainwp-stat-card.compact .stat-icon {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 0.5rem;
}

.mainwp-stat-card.compact .stat-number {
    font-size: 1.5rem;
    margin-bottom: 0.125rem;
}

.mainwp-stat-card.compact .stat-label {
    font-size: 0.8rem;
}

/* MainWP Site Cards */
.mainwp-site-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.mainwp-site-card:hover {
    border-color: #007bff;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.15);
}

.mainwp-site-card .site-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.mainwp-site-card .site-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
    margin: 0;
}

.mainwp-site-card .site-url {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: none;
    margin-top: 0.25rem;
    display: block;
}

.mainwp-site-card .site-url:hover {
    color: #007bff;
    text-decoration: underline;
}

.mainwp-site-card .site-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mainwp-site-card .status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.mainwp-site-card .status-badge.connected {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.mainwp-site-card .status-badge.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.mainwp-site-card .status-badge.updates {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* MainWP Site Details Card (for search results) */
.mainwp-site-details-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.mainwp-site-details-card .site-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.mainwp-site-details-card .site-name {
    font-weight: 600;
    font-size: 1.25rem;
    color: #212529;
    margin: 0;
}

.mainwp-site-details-card .site-url {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: none;
    margin-top: 0.25rem;
    display: block;
}

.mainwp-site-details-card .site-url:hover {
    color: #007bff;
    text-decoration: underline;
}

/* MainWP Technical Details Grid */
.mainwp-tech-details {
    margin-top: 1rem;
}

.mainwp-tech-details .mainwp-detail-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 0.75rem;
}

/* MainWP Site Details (legacy grid layout) */
.mainwp-site-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.mainwp-detail-item {
    display: flex;
    flex-direction: column;
}

.mainwp-detail-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.mainwp-detail-value {
    font-size: 0.875rem;
    color: #212529;
    font-weight: 500;
}

/* MainWP Update Indicators */
.mainwp-updates {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.mainwp-update-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

.mainwp-update-item.has-updates {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #b45309;
}

.mainwp-update-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* MainWP Filters */
#mainwp-filters .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

#mainwp-filters .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* MainWP Loading States */
.mainwp-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.mainwp-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

/* MainWP Empty State */
.mainwp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.mainwp-empty svg {
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mainwp-site-card .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mainwp-site-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mainwp-updates {
        gap: 0.5rem;
    }
    
    .mainwp-stat-card .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    #mainwp-section .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    #mainwp-filters .d-flex {
        flex-direction: column;
    }
    
    #mainwp-filters .btn {
        margin-right: 0;
        width: 100%;
    }
}

/* Animation utilities */
.mainwp-fade-in {
    animation: mainwpFadeIn 0.3s ease-in-out;
}

@keyframes mainwpFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mainwp-pulse {
    animation: mainwpPulse 2s infinite;
}

@keyframes mainwpPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
} 