/* For Message Wrapper */
[data-drupal-messages] .messages__wrapper:empty {
    display: none !important;
}

[data-drupal-messages] {
    margin: 0;
    padding: 0;
    min-height: 0;
}

/* For slider Images */
.media--ratio {
    position: relative !important;
}

.media--ratio::before {
    content: "";
    display: block;
    padding-bottom: 42.857%;
}

/* For hide Alert Wrapper*/
.alert-wrapper {
    position: relative !important;
    width: auto !important;
    z-index: auto !important;
}

/* For Read More Button */
.inline__links {
  margin-top: 10px;
}

.links-inline,
.links.inline.nav {
  margin: 0;
  padding: 0;
}

.links-inline .node-readmore,
.links.inline.nav .node-readmore {
  display: inline-block;
  padding: 0;
  margin: 0;
}

.links-inline .node-readmore a,
.links.inline.nav .node-readmore a {
  display: inline-block;
  background: #9D5940;
  color: #fff !important;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  transition: all 0.3s ease;
}

.links-inline .node-readmore a:hover,
.links.inline.nav .node-readmore a:hover,
.links-inline .node-readmore a:focus,
.links.inline.nav .node-readmore a:focus {
  background: #915638;
  color: #fff !important;
  text-decoration: none;
}

.links-inline .node-readmore a:after,
.links.inline.nav .node-readmore a:after {
  content: "\00BB";
  margin-left: 8px;
  font-size: 18px;
  vertical-align: middle;
}

.links-inline .node-readmore .visually-hidden,
.links.inline.nav .node-readmore .visually-hidden {
  display: none;
}

/* For Cards Layout */
.main-container .top-wrapper:first-child .card {
    margin-right: 15px;
}

.main-container .top-wrapper:last-child .card {
    margin-left: 15px;
}

.main-container-admin .top-wrapper:first-child .card {
    margin-right: 15px;
}

.main-container-admin .top-wrapper:last-child .card {
    margin-left: 15px;
}

/* For Footer Section */
.site-footer {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    padding: 10px 0 20px !important;
}
.site-footer .block {
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
}

/* For footer Menu */
.region-footer-bar-right ul.nav {
    display: flex;
    list-style: none;
    gap: 15px;
    padding: 0;
    margin: 0;
}

.region-footer-bar-right ul.nav li {
    display: inline-block;
}

/* For PDF-File icon */
.file--application-pdf::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background: url('/themes/custom/cese_iitb_dj/img/pdf.png') no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

.file {
 line-height:2.5 !important;
}

/* For Head of Department */
.field--name-body img {
    float: left;
    margin: 0 30px 20px 0;
}

.field--name-body p {
    text-align: justify;
}

/* For Carrot sign of Sub-sub-menu */
.menu-base-theme ul a span.sub-arrow {
        top: 50%;
        margin-top: -5px;
        bottom: auto;
        left: auto;
        margin-left: 0;
        right: 10px;
        border-style: dashed dashed dashed solid;
        border-color: transparent transparent transparent #848484 !important;
}

.sm-nowrap li {
    position: relative;
}

.sm-nowrap li > a.has-submenu {
    padding-right: 30px !important;
}

.sm-nowrap li > a .sub-arrow {
    position: absolute;
    right: 8px;
}

/* For Tables in pages */
/* DataTable Row Background Color */
table.dataTable tbody tr.odd,
table.dataTable tbody tr:nth-child(odd),
table.dataTable tr.odd td.sorting_1 {
    background: #E2E4FF !important;
}

table.dataTable tbody tr.even,
table.dataTable tbody tr:nth-child(even),
table.dataTable tr.even td.sorting_1 {
    background: #ffffff !important;
}

/* DataTables sorting icons in header */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    position: relative;
    cursor: pointer;
    padding-right: 20px !important;
}

table.dataTable thead th.sorting:after {
    content: "↕";
    position: absolute;
    right: 6px;
    color: #000;
}

table.dataTable thead th.sorting_asc:after {
    content: "▲";
    position: absolute;
    right: 6px;
    color: #000;
}

table.dataTable thead th.sorting_desc:after {
    content: "▼";
    position: absolute;
    right: 6px;
    color: #000;
}

/* DataTables header */
table.dataTable thead th,
table.dataTable thead td {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 700;
    font-family: "COOP-Regular", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
}

/* Hover */
table.dataTable thead th:hover {
    background: #ffffff !important;
    color: #000000 !important;
}

/* DataTables sorting icons */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    color: #000000 !important;
}

table.dataTable tbody td {
    font-size: 16px !important;
}    

/* For Poeple Page */
/* Faculty */
/* Appointment dropdown */
#edit-appointment,
#edit-staff-category,
#edit-student-degree {
    height: 34px;
    padding: 6px 30px 6px 12px;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    background-image: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Parent container */
.js-form-item-appointment,
.js-form-item-staff-category,
.js-form-item-student-degree {
    position: relative;
    display: inline-block;
}

/* Arrow */
.js-form-item-appointment::after,
.js-form-item-staff-category::after,
.js-form-item-student-degree::after {
    content: "\2304";/*\25BE";*/
    position: absolute;
    right: 5px;
    top: 40%;
    transform: translateY(-50%);
    color: #337ab7;
    font-size: 25px;
    pointer-events: none;
    z-index: 2;
    font-weight: 700;
}

.views-field-field-faculty-photo {
    width: 80px;
    padding: 3px 5px !important;
    vertical-align: middle !important;
}

.views-field-field-faculty-photo img,
.views-field-field-faculty-photo .img-responsive,
.views-field-field-faculty-photo .image-style-thumbnail {
    width: 68px !important;
    height: auto !important;
    max-width: none !important;
    display: block;
}

/* ==========================================
   STUDENT DETAILS VIEW - DRUPAL 9 LOOK
   ========================================== */
   
/* Remove browser arrow */
select[data-drupal-selector="edit-student-degree"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
}

/* Also remove Bootstrap/Form-select arrow */
select[data-drupal-selector="edit-student-degree"].form-select {
    background-image: none !important;
}
   
/* Student details exposed filters */
.view-student-details .d-flex.flex-wrap {
    display: flex !important;
    align-items: flex-end;
    flex-wrap: nowrap !important;
    gap: 10px;
}

/* Prevent full-width items */
.view-student-details .d-flex.flex-wrap .form-item,
.view-student-details .d-flex.flex-wrap .form-actions {
    width: auto !important;
    margin: 0 !important;
    flex: 0 0 auto;
}

/* Labels inline */
.view-student-details .d-flex.flex-wrap label {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 0;
    font-weight: 700;
}

/* Select */
.view-student-details select {
    width: 140px;
    height: 34px;
}

/* Text field */
.view-student-details input[type="text"] {
    width: 290px;
    height: 34px;
}

/* Apply button */
.view-student-details .form-actions input[type="submit"] {
    width: auto !important;
    height: 34px;
    padding: 6px 15px;
}

/* Make label + field sit on same line */
.view-student-details .js-form-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

/* Remove Bootstrap's default bottom margin */
.view-student-details .js-form-item label {
    margin-bottom: 0 !important;
    white-space: nowrap;
}

/* Prevent year field wrapper from growing */
.view-student-details .form-item-student-year {
    flex: 0 0 auto;
}

.view-student-details .form-item-student-year {
    display: flex !important;
    align-items: center;
}

.view-student-details .form-item-student-year label {
    margin: 0 8px 0 0 !important;
    white-space: nowrap;
}

/* Year of Admission text field */
.form-item-student-year input {
    height: 34px;
    width: 290px;
    padding: 6px 12px;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

/* Apply button */
.view-student-details .form-actions input[type="submit"] {
    height: 34px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    font-weight: normal !important;
    color: #fff !important;
    background-color: #5bc0de !important;
    border: 1px solid #46b8da !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    line-height: 1.42857143 !important;
}

/* Hover */
.view-student-details .form-actions input[type="submit"]:hover {
    background-color: #31b0d5;
    border-color: #269abc;
}

/* Focus */
.form-item-student-year input:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow:
        inset 0 1px 1px rgba(0,0,0,.075),
        0 0 8px rgba(102,175,233,.6);
}
/* For table details */
.view-student-details {
    font-size: 16px;
    line-height: 1.5;
}

/* Remove excessive bottom gap */
#main-content {
    margin-bottom: 0 !important;
}

/* Exposed filter form */
.view-student-details .views-exposed-form {
    margin-bottom: 8px;
}

.view-student-details .views-exposed-form label {
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    margin-right: 5px;
    margin-bottom: 0;
}

.view-student-details .views-exposed-form select,
.view-student-details .views-exposed-form input[type="text"] {
    height: 34px !important;
    width: 290px;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc !important;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

.view-student-details .views-exposed-form .btn,
.view-student-details .views-exposed-form input[type="submit"] {
    height: 20px;
    line-height: 18px;
    padding: 0 10px;
    font-size: 16px;
    border-radius: 0;
}

/* Table */
.view-student-details table,
.view-student-details table.table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 16px;
    margin-top: 5px;
}

/* Student details table header */
.view-student-details table thead th {
    background: #ffffff !important;
    color: #333333 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 8px !important;
    border: 1px solid #dddddd !important;
    border-bottom: 2px solid #ddd !important;
    vertical-align: middle !important;
}

/* Cells */
.view-student-details table tbody td {
    padding: 3px 5px;
    border: 1px solid #d8d8d8;
    font-size: 16px !important;
    line-height: 16px;
    vertical-align: middle;
}

/* Alternate rows */
.view-student-details table tbody tr:nth-child(even) {
    background: #ffffff !important;
}

.view-student-details table tbody tr:nth-child(odd) {
    background: #f9f9f9 !important;
}

/* Links */
.view-student-details table a {
    color: #666;
    text-decoration: none;
}

.view-student-details table a:hover {
    text-decoration: underline;
}

/* Pager */
.view-student-details .pagination,
.view-student-details .pager,
.view-student-details .pager-nav {
    text-align: center;
    margin-top: 10px;
}

.view-student-details .pagination li a,
.view-student-details .pager a {
    font-size: 16px;
}

/* DataTables controls */
.view-student-details .dataTables_length,
.view-student-details .dataTables_filter {
    font-size: 16px;
    margin-bottom: 5px;
}

.view-student-details .dataTables_filter input,
.view-student-details .dataTables_length select {
    height: 20px;
    font-size: 16px;
    padding: 1px 4px;
}

.view-student-details .dataTables_info {
    font-size: 16px;
    margin-top: 5px;
}

.view-student-details .dataTables_paginate {
    font-size: 16px;
    margin-top: 5px;
}

/* Remove grey header background if inherited */
.view-student-details table.table thead th,
.view-student-details table.table-bordered thead th {
    background-image: none !important;
}

.view-student-details table {
    background: #fff;
}

/* For Alumni Page in People */
.field--name-body table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin: 0 !important;
    font-family: "COOP-Regular","Helvetica Neue",Helvetica,Arial,sans-serif !important;
    font-size: 16px !important;
    line-height: 2.5 !important;
}

.field--name-body table th,
.field--name-body table td {
    border: 1px solid #000 !important;
    padding: 8px 10px !important;
    vertical-align: top;
}

.field--name-body table th {
    font-weight: 700;
    background: transparent !important;
    color: #000 !important;
}

.field--name-body table tr {
    background: transparent !important;
    color: #000 !important;
}

.item-list ul {
    list-style: disc !important;
    margin: 0 0 0 20px !important;
    padding: 0;
}


/* ==================================================
   MOBILE / TABLET RESPONSIVE
   ================================================== */
@media (max-width: 767px) {

    #main-content {
        margin-bottom: 0px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
    }

    /* Fixed header */
    body.mobile-sticky #navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: #fff;
    }

    
    body.mobile-sticky #navbar .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Hide branding/logo block */
    body.mobile-sticky #block-cese-iitb-dj-branding {
        display: none !important;
    }

    /* Show nav wrapper */
    body.mobile-sticky #nav-wrap {
        display: block !important;
    }

    /* Search section */
    body.mobile-sticky #nav-wrap .pull-right {
        display: block !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Menu section */
    body.mobile-sticky #nav-wrap .navbar-header {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Compact navbar */
    body.mobile-sticky .navbar {
        min-height: 30px !important;
        margin-bottom: 0 !important;
    }

    /* Push page content below fixed header */
    body.mobile-sticky {
        padding-top: 110px;
    }

    /* Prevent double spacing */
    body.mobile-sticky #main-content {
        margin-top: 0 !important;
    }
    
        /* Cards */
    .main-container .top-wrapper:first-child .card,
    .main-container .top-wrapper:last-child .card,
    .main-container-admin .top-wrapper:first-child .card,
    .main-container-admin .top-wrapper:last-child .card {
        margin: 0 0 15px 0 !important;
    }
    
    /* Mobile menu links */
    .menu-base-theme ul a span.sub-arrow {
    top: 50%;
    margin-top: -18px !important;
    bottom: auto;
    left: auto;
    margin-left: 0;
    right: 10px;
    border-style: none !important;
    border-color: transparent transparent    transparent #848484 !important;
   }
   
    .menu-base-theme li a:active, .menu-base-theme li a.highlighted, .menu-base-theme li a:hover, .menu-base-theme li a:focus {
        background-color: #9d5940 !important;
        color: #ffffff !important;
        border-bottom-color: #ffffff !important;
    }
    
    
    /* Footer Menu */
    .region-footer-bar-right ul.nav {
        flex-direction: column;
        gap: 5px;
        text-align: left;
    }
    
     .views-field-field-faculty-photo {
        width: 60px !important;
        padding: 2px 4px !important;
        vertical-align: middle !important;
    }

    .views-field-field-faculty-photo img,
    .views-field-field-faculty-photo .img-responsive,
    .views-field-field-faculty-photo .image-style-thumbnail {
        width: 50px !important;
        height: auto !important;
        max-width: none !important;
        display: block;
        margin: 0 auto;
    }

    /* Optional: reduce table cell padding */
    .view-faculty-directory table td,
    .view-faculty-directory table th {
        padding: 4px !important;
        font-size: 14px !important;
    }

    /* Head of Department Image */
    .field--name-body img {
        float: none !important;
        display: block;
        margin: 0 auto 20px auto !important;
        max-width: 100%;
        height: auto;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

     /* DataTables wrapper becomes horizontally scrollable */
    .dataTables_wrapper {
        display: block;
        width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent table from shrinking */
    .dataTables_wrapper table,
    .dataTables_wrapper table.dataTable {
        min-width: 900px !important;
        width: 900px !important;
    }

    /* Keep controls aligned */
    .dataTables_length,
    .dataTables_filter {
        white-space: nowrap;
    }
    
     /* Faculty Directory */
    .view-faculty-directory .dataTables_wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .view-faculty-directory table {
        min-width: 900px;
    }

    /* Student Details */
    .view-student-details .view-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .view-student-details table {
        min-width: 700px;
    }
    
    table,
    table.dataTable {
        min-width: 700px;
    }

    table.dataTable tbody td,
    table.dataTable thead th {
        font-size: 14px !important;
    }

    /* DataTables controls */
    .dataTables_length,
    .dataTables_filter {
        width: 100%;
        text-align: left !important;
        margin-bottom: 10px;
    }

    .dataTables_filter input {
        width: 90% !important;
        max-width: 100%;
    }

    /* Read More */
    .links-inline .node-readmore a,
    .links.inline.nav .node-readmore a {
        font-size: 14px;
        padding: 6px 12px;
    }

    /* Faculty / Staff / Student filters */
    .js-form-item-appointment,
    .js-form-item-staff-category,
    .js-form-item-student-degree {
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }
    
    .js-form-item-appointment::after, .js-form-item-staff-category::after, .js-form-item-student-degree::after {
    content: "\2304";
    position: absolute;
    right: 5px;
    top: 70%;
    transform: translateY(-50%);
    color: #337ab7;
    font-size: 25px;
    pointer-events: none;
    z-index: 2;
    font-weight: 700;
}

    #edit-appointment,
    #edit-staff-category,
    #edit-student-degree {
        width: 100% !important;
    }

    /* Student Details Filter Layout */
    .view-student-details .d-flex.flex-wrap {
        display: block !important;
    }

    .view-student-details .js-form-item {
        display: block !important;
        width: 100%;
        margin-bottom: 10px !important;
    }

    .view-student-details .js-form-item label {
        display: block !important;
        margin-bottom: 5px !important;
    }

    .view-student-details select,
    .view-student-details input[type="text"],
    .form-item-student-year input {
        width: 100% !important;
        max-width: 100%;
    }

    .view-student-details .form-actions {
        width: 100%;
    }

    .view-student-details .form-actions input[type="submit"] {
        width: 100% !important;
        margin-top: 5px;
    }

    /* Student Details Table */
    .view-student-details .table-responsive {
        overflow-x: auto;
    }

    .view-student-details table {
        min-width: 900px;
    }

    .view-student-details table thead th,
    .view-student-details table tbody td {
        font-size: 14px !important;
        white-space: nowrap;
    }

    /* Alumni Tables */
    .field--name-body table {
        min-width: 600px;
        font-size: 14px !important;
    }

    /* Footer */
    .site-footer {
        text-align: left !important;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    padding: 10px 20px !important;
    }

    /* Slider */
    .media--ratio::before {
        padding-bottom: 56.25%;
    }
    
     .field--name-body {
      display: block !important;
      overflow-x: auto !important;
      overflow-y: hidden !important;
      -webkit-overflow-scrolling: touch;
  }

  .field--name-body > table.table {
      width: max-content !important;
      min-width: 900px !important;
      max-width: none !important;
  }
}
