/* Modern Styles for Attachment Lists */
#main div.attachmentsContainer,
div.attachmentsContainer {
    clear: both;
    margin: 0 0 1.5em 0;
    background: transparent;
    font-family: "Times New Roman", Times, serif;
}

/* Table Styling - Modern Card-like Design */
#main div.attachmentsList table,
div.attachmentsList table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFF;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 12px;
}

#main div.attachmentsList caption,
div.attachmentsList caption {
    font-size: 1.2em;
    font-weight: bold;
    text-align: left;
    margin: 0 0 12px 0;
    padding: 0;
    color: #333;
    font-family: "Times New Roman", Times, serif;
}

/* Header Styling */
#main div.attachmentsList thead tr,
div.attachmentsList thead tr {
    background-color: #f5f5f5;
}

#main div.attachmentsList table thead th,
div.attachmentsList table thead th {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-weight: bold;
    color: #444;
}

/* Body Rows - Alternating Colors with Hover Effect */
#main div.attachmentsList tbody tr,
div.attachmentsList tbody tr {
    transition: background-color 0.2s ease;
}

#main div.attachmentsList tbody tr:hover,
div.attachmentsList tbody tr:hover {
    background-color: #f9f9f9 !important;
}

#main div.attachmentsList tbody tr td,
div.attachmentsList tbody tr td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

#main div.attachmentsList tbody tr:last-child td,
div.attachmentsList tbody tr:last-child td {
    border-bottom: none;
}

#main div.attachmentsList tbody tr.even td,
div.attachmentsList tbody tr.even td {
    background-color: #fafafa;
}

#main div.attachmentsList tbody tr.unpublished td,
div.attachmentsList tbody tr.unpublished td {
    background-color: #f8d7da;
    color: #721c24;
}

/* Links & Icons - Modern Styling */
#main div.attachmentsList table a,
div.attachmentsList table a {
    font-weight: normal;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

#main div.attachmentsList table a:hover,
div.attachmentsList table a:hover {
    color: #004499;
    text-decoration: underline;
}

#main div.attachmentsList table img,
div.attachmentsList table img {
    vertical-align: middle;
    border: 0;
    margin: 0 4px 0 0;
}

/* Button & Modal Styling */
#main div.attachmentsList a.modal-button,
div.attachmentsList a.modal-button {
    background: transparent;
    border: 0;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

#main div.attachmentsList a.modal-button:hover,
div.attachmentsList a.modal-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Add Attachment Link - Modern Button */
div.addattach {
    margin: 16px 0;
}

div.addattach a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #0066cc;
    color: white !important;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

div.addattach a:hover {
    background-color: #004499;
    text-decoration: none !important;
}

div.addattach a img {
    margin-right: 8px;
}

/* Warning & Login Styling */
div.uploadAttachmentsPage div.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
}

div.uploadAttachmentsPage div.warning h1 {
    color: #856404;
    font-size: 1.5em;
}

/* Modal Adjustments */
.modal-dialog.jviewport-width80 {
    width: 80vw;
    max-width: none;
}

.modal-body.jviewport-height80 {
    height: 80vh;
    padding: 20px;
}