/**
 * CSS Stylesheet for the Provider's Hosting Plans Table
 * File: public/css/provider-plans-table-style.css (or integrate into existing files)
 * Version: 1.0
 */

/* ======================================================
   Section Container & Title
   ====================================================== */

.nph-provider-plans-section {
    clear: both; /* Ensure it appears below other content */
    padding-top: 30px;
    margin-top: 40px; /* Space above the section */
    border-top: 1px solid #e0e0e0; /* Separator line */
}

.nph-section-title {
    font-size: 1.8em; /* Example size */
    font-weight: 600; /* Bolder title */
    color: #2d3748; /* Darker gray color */
    margin-bottom: 25px; /* Space below the title */
    padding-bottom: 10px; /* Space under text before potential border */
    border-bottom: 2px solid #007bff; /* Accent border */
    display: inline-block; /* Make border only wrap the text */
}
[dir="rtl"] .nph-section-title {
   text-align: right; /* Already set inline, but good practice */
   /* Consider RTL border adjustments if needed */
}


/* ======================================================
   Common Table Styles (Inherited/Shared with .nph-vps-dedicated-table)
   If these are already defined globally targeting .nph-vps-dedicated-table,
   you might not need to repeat all of them.
   However, defining them targeting .nph-provider-plans-table ensures they apply
   even if the other class is removed later.
   ====================================================== */

.nph-provider-plans-table { /* Targets this specific table */
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px; /* Consistent radius */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); /* Subtle shadow */
    overflow: hidden; /* Important for border-radius on tables */
    margin-top: 0; /* Override potential inherited margin */
    border: 1px solid #e2e8f0; /* Soft border */
}

/* Table Header */
.nph-provider-plans-table thead th {
    background-color: #f7fafc; /* Very light gray header */
    color: #4a5568; /* Medium gray text */
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0; /* Stronger bottom border for header */
}
[dir="rtl"] .nph-provider-plans-table thead th {
    text-align: right;
}


/* Table Body Rows & Cells */
.nph-provider-plans-table tbody tr {
    border-bottom: 1px solid #edf2f7; /* Light separator between rows */
    transition: background-color 0.15s ease-in-out;
}

.nph-provider-plans-table tbody tr:last-child {
    border-bottom: none; /* No border for the last row */
}

.nph-provider-plans-table tbody tr:hover {
    background-color: #f8f9fa; /* Slightly different hover */
}

.nph-provider-plans-table tbody td {
    padding: 15px 15px; /* Consistent padding */
    font-size: 0.95em;
    color: #4a5568;
    vertical-align: middle; /* Align content vertically */
    line-height: 1.5;
}
[dir="rtl"] .nph-provider-plans-table tbody td {
    text-align: right;
}

/* Cell Content Specifics */
.nph-provider-plans-table td strong a { /* Plan name link */
    color: #2d3748; /* Darker link for plan name */
    text-decoration: none;
    font-weight: 600;
}
.nph-provider-plans-table td strong a:hover {
    color: #007bff;
}

.nph-provider-plans-table td small { /* Price suffixes like /mo */
    font-size: 0.8em;
    color: #718096;
    margin-left: 3px;
}
[dir="rtl"] .nph-provider-plans-table td small {
    margin-left: 0;
    margin-right: 3px;
}


/* Buttons inside the table */
/* Using the same classes as the VPS table ensures consistency */
.nph-provider-plans-table .nph-vps-dedicated-btn,
.nph-provider-plans-table .nph-vps-dedicated-details-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    vertical-align: middle; /* Align buttons if they wrap */
}

.nph-provider-plans-table .nph-vps-dedicated-btn { /* Get Plan Button */
    background-color: #007bff;
    color: #ffffff;
    margin-right: 5px;
}
[dir="rtl"] .nph-provider-plans-table .nph-vps-dedicated-btn {
    margin-right: 0;
    margin-left: 5px;
}

.nph-provider-plans-table .nph-vps-dedicated-details-btn { /* Details Button */
    background-color: #e9ecef; /* Lighter gray for details */
    color: #495057;
    border: 1px solid #ced4da; /* Subtle border */
}

.nph-provider-plans-table .nph-vps-dedicated-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px); /* Slight lift effect */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #ffffff;
}

.nph-provider-plans-table .nph-vps-dedicated-details-btn:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: #343a40;
}

/* ======================================================
   Responsive Styles for Provider Plans Table
   ====================================================== */

@media (max-width: 768px) {
    .nph-provider-plans-table thead {
        display: none; /* Hide table header */
    }

    .nph-provider-plans-table tbody,
    .nph-provider-plans-table tr,
    .nph-provider-plans-table td {
        display: block; /* Make cells stack */
        width: 100%;
        box-sizing: border-box;
    }

    .nph-provider-plans-table tr {
        margin-bottom: 15px;
        border: 1px solid #e2e8f0; /* Border around each "card" */
        border-radius: 8px;
        padding: 0; /* Remove padding from tr */
        background: #ffffff; /* Ensure background */
        box-shadow: none; /* Remove shadow from tr if inherited */
    }
     .nph-provider-plans-table tr:last-child {
        margin-bottom: 0; /* No margin for the last card */
    }


    .nph-provider-plans-table td {
        padding: 12px 15px; /* Adjust padding */
        text-align: right; /* Align value to the right */
        border-bottom: 1px dashed #edf2f7; /* Dashed separator between fields */
        position: relative; /* Needed for pseudo-element */
        min-height: 40px; /* Ensure some height */
        display: flex; /* Use flex for alignment */
        justify-content: space-between; /* Space between label and value */
        align-items: center;
    }
    .nph-provider-plans-table td:last-child {
        border-bottom: none; /* No border for the last cell in a card */
    }


    .nph-provider-plans-table td:before {
        content: attr(data-label); /* Get label from data attribute */
        font-weight: 600;
        color: #2d3748;
        margin-right: 10px; /* Space between label and value */
        text-align: left; /* Align label text left */
        flex-shrink: 0; /* Prevent label from shrinking */
    }

    /* RTL adjustments for responsive */
    [dir="rtl"] .nph-provider-plans-table td {
        text-align: left; /* Align value to the left */
        flex-direction: row-reverse; /* Reverse label/value order */
    }
    [dir="rtl"] .nph-provider-plans-table td:before {
        text-align: right;
        margin-right: 0;
        margin-left: 10px;
    }

    /* Adjust buttons for responsive */
    .nph-provider-plans-table .nph-vps-dedicated-btn,
    .nph-provider-plans-table .nph-vps-dedicated-details-btn {
        display: inline-block; /* Keep inline-block for side-by-side */
        width: auto; /* Let them size naturally or adjust with padding */
        padding: 8px 15px;
        margin: 5px 5px 5px 0; /* Adjust margins */
    }
    [dir="rtl"] .nph-provider-plans-table .nph-vps-dedicated-btn,
    [dir="rtl"] .nph-provider-plans-table .nph-vps-dedicated-details-btn {
       margin: 5px 0 5px 5px;
    }

     /* Center buttons within their cell on mobile */
     .nph-provider-plans-table td[data-label*="Plan"], /* Target Get Plan cell */
     .nph-provider-plans-table td[data-label*="الخطة"] {
         /* Override flex settings for this cell */
         display: block;
         text-align: center;
     }
      .nph-provider-plans-table td[data-label*="Plan"]:before,
      .nph-provider-plans-table td[data-label*="الخطة"]:before {
          display: none; /* Hide the pseudo-label for button cell */
      }

}

@media (max-width: 480px) {
    .nph-section-title {
        font-size: 1.5em;
    }
    /* Stack buttons fully on very small screens if needed */
    .nph-provider-plans-table .nph-vps-dedicated-btn,
    .nph-provider-plans-table .nph-vps-dedicated-details-btn {
       /* display: block; */ /* Uncomment to stack */
       /* width: 100%; */
       /* margin: 5px 0; */
    }
}