/* Hostbility Pages - shared UI helpers for Hostbility client-area pages.
   Scoped to Hostbility classes to avoid conflicts with WHMCS core styles. */

.h-page-container {
    padding: 20px 0;
    color: var(--hb-ref-text, #1f2937);
    max-width: 100%;
    margin: 0;
}

/* Titles */
.h-title {    font-weight: 600;
    margin: 0 0 8px;
    font-size: var(--hb-ref-page-title-size, 1.5rem);
    font-weight: var(--hb-ref-page-title-weight, 700);
    line-height: var(--hb-ref-page-title-line, 1.2);
    color: var(--hb-ref-heading, #111827);
}

/* Cards */
.h-modern-card {
    border: 1px solid var(--hb-ref-border, #e5e7eb) !important;
    border-radius: var(--hb-ref-card-radius, 18px) !important;
    background: #fff;
    box-shadow: var(--hb-ref-card-shadow, 0 18px 44px rgba(15, 23, 42, 0.05));
    padding: var(--hb-ref-card-body-pad, 28px) !important;
    transition: box-shadow 0.3s ease;
}

.h-modern-card:hover {
    box-shadow: 0 14px 30px rgba(7, 38, 115, 0.10);
}

.h-modern-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--hb-ref-border-soft, #eef2f7);
    padding: 0 0 18px 0 !important;
    margin-bottom: 18px;
}

.h-modern-card .card-body {
    padding: 0 !important;
}

/* Modals (unscoped, but aligned to Hostbility design language) */
.modal-content {
    border: none !important;
    border-radius: var(--hb-ref-card-radius, 18px) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.15);
}

.modal-header {
    border-bottom: none !important;
    padding: 24px 24px 0 24px !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-title {
    font-weight: 600;
    color: var(--hb-ref-heading, #111827);
}

/* Alerts */
.h-alert {
    border: none;
    border-radius: var(--hb-ref-alert-radius, 14px);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
}

.h-alert-success {
    background-color: #f0fdf4;
    color: #166534;
}

.h-alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.h-alert i {
    font-size: 18px;
    margin-right: 12px;
    margin-top: 2px;
}

/* Info Rows */
.h-info-row {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.h-info-row:last-child {
    border-bottom: none;
}

.h-info-label {
    color: var(--hb-ref-muted, #6b7280);
    font-size: 0.84rem;
    font-weight: 600;
    width: 40%;
}

.h-info-value {
    color: var(--hb-ref-heading, #111827);
    font-size: 0.94rem;
    font-weight: 700;
    width: 60%;
    text-align: right;
}

/* Form Styles */
.h-label {
    font-size: var(--hb-ref-form-label-size, 0.84rem);
    font-weight: var(--hb-ref-form-label-weight, 700);
    color: var(--hb-ref-heading, #111827);
    margin-bottom: 8px;
    display: block;
}

.h-modern-input-group {
    position: relative;
    border: 1px solid var(--hb-ref-border, #e5e7eb);
    border-radius: var(--hb-ref-form-radius, 10px);
    transition: all 0.2s ease;
    background: #fff;
}

.h-modern-input-group:focus-within {
    border-color: var(--h-primary, #072673);
    box-shadow: 0 0 0 3px rgba(7, 38, 115, 0.10);
}

.h-modern-input-group .form-control {
    border: none;
    min-height: var(--hb-ref-form-min-h, 46px);
    padding: 24px 12px 8px;
    font-size: var(--hb-ref-form-font-size, 0.92rem);
    background: transparent;
    box-shadow: none !important;
    color: var(--hb-ref-table-td-color, #374151);
    line-height: 1.5;
}

.h-floating-label {
    position: absolute;
    top: 14px;
    left: 12px;
    font-size: var(--hb-ref-form-font-size, 0.92rem);
    color: var(--hb-ref-muted, #6b7280);
    transition: all 0.2s ease;
    pointer-events: none;
    font-weight: 500;
    line-height: 1;
}

.form-control:focus + .h-floating-label,
.form-control:not(:placeholder-shown) + .h-floating-label {
    top: 8px;
    font-size: 0.72rem;
    color: var(--hb-ref-muted, #6b7280);
}

/* Split Input (Directory) */
.h-input-group-split {
    display: flex;
    border: 1px solid var(--hb-ref-border, #e5e7eb);
    border-radius: var(--hb-ref-form-radius, 10px);
    overflow: visible;
    background: #f9fafb;
    align-items: stretch;
    transition: all 0.2s ease;
    min-height: var(--hb-ref-form-min-h, 46px);
    position: relative;
}

.h-input-group-split:focus-within {
    border-color: var(--h-primary, #072673);
    box-shadow: 0 0 0 3px rgba(7, 38, 115, 0.10);
}

.h-input-group-split .input-group-prepend {
    background: #f9fafb;
    border-right: 1px solid var(--hb-ref-border, #e5e7eb);
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--hb-ref-muted, #6b7280);
    font-size: var(--hb-ref-form-font-size, 0.92rem);
    white-space: nowrap;
}

.h-input-group-split .form-control {
    border: none;
    height: 100%;
    padding: 12px 16px;
    font-size: var(--hb-ref-form-font-size, 0.92rem);
    background: #fff;
    color: var(--hb-ref-table-td-color, #374151);
    box-shadow: none !important;
}

/* Buttons */
.h-btn-primary {
    background-color: var(--h-primary, #072673) !important;
    border-color: var(--h-primary, #072673) !important;
    border-radius: var(--hb-ref-btn-radius, 12px) !important;
    min-height: var(--hb-ref-btn-min-h, 42px);
    padding: var(--hb-ref-btn-pad-y, 10px) var(--hb-ref-btn-pad-x, 18px) !important;
    font-weight: var(--hb-ref-btn-weight, 700) !important;
    font-size: var(--hb-ref-btn-font-size, 0.86rem) !important;
    transition: var(--hb-ref-transition, all 0.2s ease) !important;
    box-shadow: 0 14px 28px rgba(7, 38, 115, 0.18);
}

.h-btn-primary:hover {
    background-color: var(--h-primary-hover, #051d5a) !important;
    border-color: var(--h-primary-hover, #051d5a) !important;
    transform: translateY(-1px);
}

/* Tables */
.h-table-clean {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.h-table-clean thead th {
    border-bottom: 2px solid var(--hb-ref-table-th-border, #eef2f7);
    border-top: none;
    color: var(--hb-ref-table-th-color, #6b7280);
    font-weight: var(--hb-ref-table-th-font-weight, 700);
    font-size: var(--hb-ref-table-th-font-size, 0.7rem);
    text-transform: uppercase;
    letter-spacing: var(--hb-ref-table-th-letter-spacing, 0.05em);
    padding: var(--hb-ref-table-th-pad-y, 16px) var(--hb-ref-table-th-pad-x, 18px);
    background: var(--hb-ref-table-th-bg, #f9fafb);
}

.h-table-clean tbody td {
    border-top: 1px solid var(--hb-ref-table-td-border, #f1f5f9);
    padding: var(--hb-ref-table-td-pad, 18px);
    color: var(--hb-ref-table-td-color, #374151);
    font-size: var(--hb-ref-table-td-font-size, 0.92rem);
    vertical-align: middle;
}

.h-table-clean tbody tr:hover {
    background: #fbfcff;
}

/* Responsive helpers */
@media (max-width: 768px) {
    .h-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .h-info-label,
    .h-info-value {
        width: 100%;
        text-align: left;
    }
}
