/* Document Manager Frontend Styles */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --kdm-dark-blue:#0D4770;
    --kdm-light-blue:#1A5A96;
    --kdm-yellow:#FFD100;
    --kdm-text-dark:#333;
    --kdm-border:#e0e0e0;
    --kdm-shadow:0 4px 6px rgba(0,0,0,.1);
    --kdm-shadow-lg:0 10px 20px rgba(0,0,0,.15);
}

/* ===============================
   LISTING CONTAINER
================================*/

.markh-dm-listing{
    background:#fff;
    max-width:1200px;
    margin:30px auto;
    border-radius:12px;
    box-shadow:var(--kdm-shadow-lg);
    overflow:hidden;
}

/* Header */

.markh-dm-header{
    background:linear-gradient(135deg,var(--kdm-dark-blue),var(--kdm-light-blue));
    padding:40px 30px;
}

.markh-dm-header h2{
    margin:0;
    color:#fff;
    font-size:32px;
    font-weight:700;
}

.markh-dm-category-description{
    margin-top:10px;
    font-size:15px;
    color:rgba(255,255,255,.9);
}

/* ===============================
   SEARCH
================================*/

.markh-dm-search{
    padding:30px;
    background:#f8f9fa;
    border-bottom:1px solid var(--kdm-border);
}

.markh-dm-search-form{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.markh-dm-search-input{
    flex:1;
    min-width:250px;
    padding:12px 18px;
    border:2px solid var(--kdm-border);
    border-radius:6px;
    font-size:14px;
    transition:.3s;
}

.markh-dm-search-input:focus{
    outline:none;
    border-color:var(--kdm-dark-blue);
    box-shadow:0 0 8px rgba(13,71,112,.2);
}

.markh-dm-search-btn{
    padding:12px 32px;
    border:none;
    border-radius:6px;
    background:var(--kdm-yellow);
    color:var(--kdm-dark-blue);
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.markh-dm-search-btn:hover{
    background:#ffc700;
    transform:translateY(-2px);
}

/* ===============================
   CATEGORY FILTER
================================*/

.markh-dm-filter{
    padding:30px;
    border-bottom:1px solid var(--kdm-border);
}

.markh-dm-filter h3{
    margin:0 0 16px;
    font-size:16px;
    color:var(--kdm-dark-blue);
}

.markh-dm-category-filter{
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.markh-dm-category-filter a{
    padding:8px 18px;
    border-radius:25px;
    background:#f0f0f0;
    text-decoration:none;
    font-size:14px;
    color:var(--kdm-dark-blue);
    transition:.3s;
}

.markh-dm-category-filter a:hover{
    background:var(--kdm-yellow);
}

.markh-dm-category-filter a.active{
    background:var(--kdm-dark-blue);
    color:#fff;
}

/* ===============================
   DOCUMENT TABLE
================================*/

.markh-dm-documents{
    padding:30px;
}

.markh-dm-table{
    width:100%;
    border-collapse:collapse;
}

.markh-dm-table thead{
    background:var(--kdm-dark-blue);
    color:#fff;
}

.markh-dm-table th{
    padding:16px;
    font-size:14px;
    text-align:left;
}

.markh-dm-table td{
    padding:16px;
    font-size:14px;
    border-bottom:1px solid var(--kdm-border);
}

.markh-dm-table tbody tr:hover{
    background:#f8f9fa;
}

.markh-dm-title a{
    color:var(--kdm-dark-blue);
    font-weight:600;
    text-decoration:none;
}

.markh-dm-title a:hover{
    color:var(--kdm-light-blue);
}

.markh-dm-description{
    margin-top:6px;
    font-size:13px;
    color:#888;
}

.markh-dm-downloads,
.markh-dm-action{
    text-align:center;
}

/* Buttons */

.button.markh-dm-view-btn{
    background:var(--kdm-yellow);
    border:none;
    padding:10px 26px;
    border-radius:6px;
    color:var(--kdm-dark-blue);
    font-weight:600;
    text-decoration:none;
    transition:.3s;
}

.button.markh-dm-view-btn:hover{
    background:#ffc700;
    transform:translateY(-2px);
}

/* ===============================
   NO RESULTS
================================*/

.markh-dm-no-documents{
    text-align:center;
    padding:50px 30px;
    background:#f9f9f9;
    border-radius:8px;
}

.markh-dm-no-documents p{
    margin:0;
    color:#666;
}

/* ===============================
   ERROR MESSAGE
================================*/

.markh-dm-search-error{
    margin:20px 30px;
    padding:16px;
    background:#fff3cd;
    border-left:4px solid #ffc107;
    border-radius:6px;
    color:#856404;
}

/* ===============================
   DETAIL PAGE
================================*/

.markh-dm-detail{
    background:#fff;
    max-width:1100px;
    margin:30px auto;
    border-radius:12px;
    box-shadow:var(--kdm-shadow-lg);
    overflow:hidden;
}

/* Header */
.markh-dm-detail-header {
    background: linear-gradient(135deg, var(--kdm-dark-blue), var(--kdm-light-blue));
    padding: 40px 30px;
    color: #fff;
    display: flex;
    flex-wrap: wrap;          /* allow wrapping on smaller screens */
    justify-content: space-between;
    align-items: center;
    gap: 20px;                /* space between title and button */
    border-radius: 12px 12px 0 0;
}

.markh-dm-detail-header-content {
    flex: 1 1 auto;           /* allow title to take available space */
    min-width: 200px;         /* prevent title from shrinking too small */
}

.markh-dm-detail-header-action {
    flex: 0 0 auto;           /* button keeps its size */
    margin-left: auto;        /* push button to the right */
}


/* Breadcrumb */

.markh-dm-breadcrumb{
    font-size:14px;
    margin-bottom:12px;
}

.markh-dm-breadcrumb a{
    color:var(--kdm-yellow);
    text-decoration:none;
}

.markh-dm-breadcrumb a:hover{
    text-decoration:underline;
}

.markh-dm-detail h1{
    margin:0;
    font-size:34px;
}

/* Content Layout */

.markh-dm-detail-content{
    display:grid;
    grid-template-columns:1fr 2fr;
    gap:40px;
    padding:40px;
}

/* Info Table */

.markh-dm-info-table{
    width:100%;
    border-collapse:collapse;
    border:1px solid var(--kdm-border);
    border-radius:8px;
    overflow:hidden;
}

.markh-dm-info-table th{
    background:#f5f7fa;
    padding:14px;
    font-size:13px;
    text-transform:uppercase;
    color:var(--kdm-dark-blue);
    width:45%;
}

.markh-dm-info-table td{
    padding:14px;
    font-size:14px;
}

.markh-dm-info-table tr:not(:last-child){
    border-bottom:1px solid #eee;
}

/* Description */

.markh-dm-detail-description h2{
    margin-top:0;
    margin-bottom:20px;
    font-size:22px;
    color:var(--kdm-dark-blue);
    border-bottom:3px solid var(--kdm-dark-blue);
    padding-bottom:12px;
}

.markh-dm-description-content{
    font-size:15px;
    line-height:1.9;
    color:#555;
}

/* Download Button */
/* Download Button */
.markh-dm-download-btn {
    padding: 14px 40px;
    font-size: 16px;
    border-radius: 8px;
    background: var(--kdm-yellow);
    color: var(--kdm-dark-blue);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;      /* prevent wrapping inside button */
}

.markh-dm-download-btn:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(255,209,0,.4);
}

/* ===============================
   RESPONSIVE
================================*/

@media (max-width:900px){

.markh-dm-detail-header{
    flex-direction:column;
    align-items:flex-start;
    gap:20px;
}

.markh-dm-detail-content{
    grid-template-columns:1fr;
    padding:30px;
}

.markh-dm-download-btn{
    width:100%;
    text-align:center;
}

}

@media (max-width:768px){

.markh-dm-header{
    padding:30px 20px;
}

.markh-dm-header h2{
    font-size:26px;
}

.markh-dm-search,
.markh-dm-filter,
.markh-dm-documents{
    padding:20px;
}

.markh-dm-table th,
.markh-dm-table td{
    padding:12px;
}

}

@media (max-width:480px){

.markh-dm-header h2{
    font-size:22px;
}

.markh-dm-detail h1{
    font-size:24px;
}

.markh-dm-info-table th,
.markh-dm-info-table td{
    padding:10px;
}

}