/* Hosting Manager Module Custom Styles */

/* Service Status Badges */
.hosting-service-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.hosting-service-status.pending {
    background-color: #f39c12;
    color: #fff;
}

.hosting-service-status.active {
    background-color: #00a65a;
    color: #fff;
}

.hosting-service-status.suspended {
    background-color: #dd4b39;
    color: #fff;
}

.hosting-service-status.terminated,
.hosting-service-status.cancelled {
    background-color: #999;
    color: #fff;
}

/* Statistics Cards */
.hosting-stat-card {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.hosting-stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.hosting-stat-card h3 {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0;
}

.hosting-stat-card p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Product Cards */
.hosting-product-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.hosting-product-card:hover {
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.hosting-product-card h4 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hosting-product-price {
    font-size: 32px;
    font-weight: 700;
    color: #2196F3;
    margin: 15px 0;
}

.hosting-product-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.hosting-product-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.hosting-product-features li:last-child {
    border-bottom: none;
}

.hosting-product-features li i {
    color: #00a65a;
    margin-right: 10px;
}

/* Server Cards */
.hosting-server-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
}

.hosting-server-card .server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hosting-server-card .server-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.hosting-server-card .server-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #00a65a;
}

.hosting-server-card .server-status.offline {
    background-color: #dd4b39;
}

.hosting-server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.hosting-server-info-item {
    font-size: 13px;
}

.hosting-server-info-item strong {
    display: block;
    color: #888;
    font-weight: 500;
    margin-bottom: 5px;
}

/* Service Details */
.hosting-service-details {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
}

.hosting-service-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.hosting-service-details .detail-row:last-child {
    border-bottom: none;
}

.hosting-service-details .detail-label {
    font-weight: 600;
    color: #555;
}

.hosting-service-details .detail-value {
    color: #333;
}

/* Usage Bars */
.hosting-usage-bar {
    background: #f5f5f5;
    border-radius: 10px;
    height: 30px;
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}

.hosting-usage-bar-fill {
    background: linear-gradient(90deg, #2196F3, #21CBF3);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.hosting-usage-bar-fill.warning {
    background: linear-gradient(90deg, #f39c12, #f5b041);
}

.hosting-usage-bar-fill.danger {
    background: linear-gradient(90deg, #dd4b39, #e74c3c);
}

/* Client Portal Styles */
.client-hosting-service {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.client-hosting-service:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.client-hosting-service .service-domain {
    font-size: 18px;
    font-weight: 600;
    color: #2196F3;
    margin-bottom: 10px;
}

.client-hosting-service .service-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* Login Details Box */
.hosting-login-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.hosting-login-box .login-item {
    margin-bottom: 15px;
}

.hosting-login-box .login-item:last-child {
    margin-bottom: 0;
}

.hosting-login-box .login-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.hosting-login-box .login-value {
    font-family: 'Monaco', 'Courier New', monospace;
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .hosting-stat-card {
        margin-bottom: 15px;
    }
    
    .hosting-server-info {
        grid-template-columns: 1fr;
    }
    
    .client-hosting-service .service-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hosting-fade-in {
    animation: fadeInUp 0.4s ease;
}

/* Copy button */
.btn-copy {
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 5px;
}

/* Server capacity indicator */
.server-capacity {
    display: inline-block;
    width: 100%;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.server-capacity-fill {
    height: 100%;
    background: #00a65a;
    transition: width 0.3s ease;
}

.server-capacity-fill.warning {
    background: #f39c12;
}

.server-capacity-fill.danger {
    background: #dd4b39;
}

/* ========================================
   CLIENT PORTAL - MY SERVICES DROPDOWN MENU
   (Horizontal top navbar - Bootstrap dropdown)
   ======================================== */

.hm-dropdown-parent {
    position: relative;
}

.hm-dropdown-parent > a.dropdown-toggle {
    cursor: pointer;
}

.hm-services-dropdown.dropdown-menu {
    min-width: 260px;
    max-width: 320px;
    padding: 6px 0;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.hm-services-dropdown.dropdown-menu > li > a {
    padding: 9px 18px;
    font-size: 13px;
    color: #555;
    display: block;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s ease, color 0.15s ease;
}

.hm-services-dropdown.dropdown-menu > li > a:hover,
.hm-services-dropdown.dropdown-menu > li > a:focus {
    background-color: #f0f4f8;
    color: #333;
    text-decoration: none;
}

.hm-services-dropdown.dropdown-menu > li.active > a,
.hm-services-dropdown.dropdown-menu > li.active > a:hover {
    background-color: #2196F3;
    color: #fff;
}

.hm-services-dropdown.dropdown-menu > li.active > a i {
    color: #fff;
}

.hm-services-dropdown.dropdown-menu > li > a i {
    color: #2196F3;
    font-size: 13px;
}

/* ========================================
   CLIENT INVOICE PORTAL STYLES
   ======================================== */

/* Invoice list table */
.client-invoice-list .table > tbody > tr:hover {
    background-color: #f8f9fa;
}

.client-invoice-list .table > tbody > tr td {
    vertical-align: middle;
}

/* Invoice status badges - enhanced */
.label-invoice-paid {
    background-color: #00a65a;
}

.label-invoice-unpaid {
    background-color: #f39c12;
}

.label-invoice-overdue {
    background-color: #dd4b39;
}

/* Payment gateway cards */
.payment-gateway-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-gateway-card:hover,
.payment-gateway-card.selected {
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.payment-gateway-card i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

/* Invoice detail view */
.invoice-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.invoice-status-card {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
}

.invoice-status-card h4 {
    margin: 0 0 5px 0;
}

.invoice-status-card small {
    color: #888;
}

/* Invoice items table - client view */
.invoice-items-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.invoice-items-table tfoot td {
    font-weight: 500;
}

.invoice-items-table tfoot tr:last-child td {
    font-weight: 700;
    font-size: 16px;
    border-top: 2px solid #333;
}

/* Promo code badge on invoice */
.promo-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #00b894;
    color: #fff;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Tax calculation notice */
.tax-notice {
    font-size: 11px;
    color: #888;
    font-style: italic;
}

/* Print styles for invoice PDF fallback */
@media print {
    .panel_s {
        border: none !important;
        box-shadow: none !important;
    }
    
    .btn, .nav-tabs, .panel-heading {
        display: none !important;
    }
    
    .panel-body {
        padding: 0 !important;
    }
}

/* ============================================================
 * NATIVE CHECKBOX OVERRIDE
 * ============================================================
 * Perfex CRM ships iCheck which wraps every <input type=checkbox>
 * with a styled <div> that absorbs clicks. On the Hosting Manager
 * client-facing pages (register, order-product config options,
 * VPS rebuild confirmation, etc.) the wrapper produced an unstyled
 * empty box that did not toggle. Restore native browser controls
 * inside any element flagged `.hm-native-checkbox` (or the whole
 * `.hm-page` body wrapper for our module). Native checkboxes
 * are accessible, lighter, and consistent with the WHMCS-style
 * client portal we're shipping.
 */
.hm-page .icheckbox_minimal,
.hm-page .icheckbox_minimal-blue,
.hm-page .iradio_minimal,
.hm-page .iradio_minimal-blue,
.hm-native-checkbox .icheckbox_minimal,
.hm-native-checkbox .icheckbox_minimal-blue,
.hm-native-checkbox .iradio_minimal,
.hm-native-checkbox .iradio_minimal-blue {
    display: none !important;
}
.hm-page input[type="checkbox"],
.hm-page input[type="radio"],
.hm-native-checkbox input[type="checkbox"],
.hm-native-checkbox input[type="radio"] {
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    opacity: 1 !important;
    position: static !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 6px !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}
.hm-page label,
.hm-native-checkbox label {
    cursor: pointer;
}
