/*
  ixAccred™ Stylesheet
  © ixAccred™. All rights reserved.
  Unauthorized copying or reuse is prohibited.
*/


/* =========================================================
   ixAccred™ Responsive Overrides For Mobile/Tablet UX
   Purpose: ALL @media rules live here (site-wide + page-specific)
   Load AFTER all base CSS files.
   IMPORTANT:
   - Load this AFTER ixAccred_css_style.css and ixAccred_groups_style.css
   - This file should contain ONLY @media blocks

   /* Breakpoints:
   900 = desktop tighten
   768 = tablet
   600 = small tablet / large phone
   560 = header layout wraps to 2 rows
   480 = phone
   360 = tiny phone
   ========================================================= */


/* ============================
   1200 = desktop tighten
   ============================ */

/* ===== Likes Grid ===== */
@media (max-width: 1200px) {
  .ix-likes-list {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ============================
   992 = desktop tighten
   ============================ */

/* ===== Likes Grid ===== */
@media (max-width: 992px) {
  .ix-likes-list {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ============================
   900 = desktop tighten
   ============================ */

/* ============Header responsive=Source: ixAccred_header_page.php================*/
@media (max-width: 900px){
  .ix-header-left{ min-width: 170px; }
  .ix-header-right{ min-width: 220px; }
  .ix-logo{ font-size: 30px; }
  .ix-header-right{ gap: 8px; }
  /*.ix-search{ max-width: 360px; }*/
}

/* ==================Groups responsive: ixAccred_group_styles.css================= */
@media (max-width: 900px){
  /* Responsive */
  .group-members-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/*====================================*/
/* START OF CSS CODE FOR PROFILE PAGE */
/*====================================*/

/* ==========🔹 LAYOUT CONTAINERS============================*/
/*        (page width, main frame, columns)                  */
/* Tablet 
@media (max-width: 900px){
  .ix-menu-container{
    width: 100%;
    padding: 0 10px;
  }
}*/

/* ==========🔹 PROFILE PAGE================================*/   
/*     (profile, cover, avatar, follow, menu)

/* Responsive */
@media (max-width: 900px){
  .ix-profile{
    width: 100%;
    padding: 15px;
  }
}

/* =========🔹 FORMS & BUTTONS===============================*/
/* Tablets */
@media (max-width: 900px){
  .ix-menu-container{
    grid-auto-flow: row;                 /*switch mode */
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
  }
}

/* Responsive: Adjust columns for smaller screens */
 @media (max-width: 900px) {
 .invite-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }
 }

/* Responsive: My Organization Marketing: ixAccred_my_organization_marketing.php*/
 @media (max-width: 900px){
  .org-features{ grid-template-columns: 1fr; }
  .org-hero h2{ font-size: 28px; }
  .org-hero p{ font-size: 15px; }
}

/* Mobile: Request Demo Page (ixAccred_request_demo_page.php)*/
@media (max-width: 900px){
  .ix-form div[style*="grid-template-columns"]{
    grid-template-columns: 1fr !important;
  }
}

/* NOTE: DUPLICATION ALERT ✅
   .ix-menu-container @media (max-width: 900px) appears in multiple blocks (profile + forms/buttons).
   I left both (duplicated by design) so you can clean later. */


/* ============================
   768 = tablet
   ============================ */

/* ============Header responsive=Source: ixAccred_header_page.php================*/
@media (max-width: 768px){

  /* ===================== HEADER (768) ===================== */
  .ix-btn-link{ display:none; }
  .ix-logo{ font-size: 26px; }
  /*.ix-search{ max-width: 300px; }*/

  /* ===================== GROUPS (768) ===================== */
  .ixg-shell{
    width: calc(100% - 20px);
    margin: 0 10px;
    padding: 14px;
  }

  .ixg-title-row{
    flex-direction: column;
    align-items: stretch;
  }

  .ixg-actions{ justify-content: center; }
  .ixg-menu{ justify-content: center; }
  .ixg-menu-container{ justify-content: center; }

  .ixg-photo{ width: calc(50% - 10px); }
  .ixg-photo-img{ height: 160px; }

  .photos-grid img {
    width: calc(50% - 10px);
  }
}


/*====================================*/
/* START OF CSS CODE FOR PROFILE PAGE */
/*====================================*/

/* Mobile*/ 

/* COMMENT OUT (flex-based; only applies if .ix-menu-container is display:flex) */
/*
@media (max-width: 768px){
  .ix-menu-container{
    flex-direction: column;
    gap: 6px;
  }
}
*/

/* KEEP THIS ONE (grid-based; matches your canonical .ix-menu-container { display:grid; }) */
@media (max-width: 768px){
  .ix-menu-container{
    grid-template-columns: 1fr;
  }
  .ix-menu-btn{
    width: 100%;
  }
}

/* COMMENT OUT (duplicate of the kept grid block) */
/*
@media (max-width: 768px){
  .ix-menu-container{
    grid-template-columns: 1fr;
  }

  .ix-menu-btn{
    width: 100%;
  }
}
*/

/* Mobile */

/* COMMENT OUT (flex-based; only applies if .ix-menu-container is display:flex) */
/*
@media (max-width: 768px){
  .ix-menu-container{
    flex-direction: column;
    align-items: stretch;
  }

  .ix-menu-btn{
    width: 100%;
  }
}
*/


/* Responsive */
@media (max-width: 768px){
  .ix-profile-meta-row{
    flex-direction: column;
    gap: 12px;
  }
}

/* 481–768 px: let the thumb grow, but only a bit */
@media (max-width: 768px){
  .link-preview img{
      flex: 0 0 40%;    /* at most 40 % of the card */
      max-width: 160px; /* and never wider than 160 px */
      height: auto;
  }
}

/* ---💻  TABLETS (481 – 768 px)------*/
@media(max-width:768px){
    #post{ padding:16px 14px; }
    .post-image-container img{
        width:60px;
        height:60px;
    }
    .post-actions{ gap:14px; font-size:14px; }
}

/* ===== Likes Grid ===== */
@media (max-width: 768px) {
  .ix-likes-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========🔹 FORMS & BUTTONS===============================*/

/*==========================================*/
/* START OF CSS CODE FOR THE COMMUNITY PAGE */
/*==========================================*/
/* Mobile: let row wrap nicely */
@media (max-width:768px){
  .ix-composer-actions{ flex-wrap: wrap; }
  #media_preview.ix-media-preview{ flex: 1 1 100%; }
  #post_button{ margin-left: 0; }
}

@media (max-width: 768px){
  .org-cta-row{ justify-content:flex-start; }
  .org-cta-right{ margin-left: 0; }
}

/*==============================================*/
/* START OF CSS CODE FOR MY ORGANIZATION PAGE   */
/*==============================================*/

/* ========My Organization – Hub=============*/
/* ===========================
   Mobile Enhancements
   =========================== */
@media (max-width: 768px) {

    .org-hub {
        padding: 15px;
    }

    .org-hub-title {
        font-size: 20px;
    }

    .org-judgment h2 {
        font-size: 18px;
    }

    .org-judgment p {
        font-size: 15px;
    }

    .org-hub-description {
        font-size: 16px;
    }

    .org-admin-link a,
    .org-hub-cta a {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    .assignment-row {
        flex-direction: column;
        align-items: stretch;
    }

    .assignment-row select {
        width: 100%;
    }

    .remove-assignment {
        width: 100%;
    }
}

/*==============================================*/
/* START OF CSS CODE FOR THE MESSAGES PAGE      */
/*==============================================*/

/* Mobile tweaks */
@media (max-width: 768px){
  .ix-thread-card{
    padding: 12px;
  }

  .ix-thread-avatar{
    width: 56px;
    height: 56px;
    margin-right: 8px;
  }

  .ix-thread-open{
    width: 42px;
  }

  .ix-thread-open-icon{
    width: 24px;
    height: 70px;
  }
}

/*==============================================*/
/*       START OF CSS CODE FOR PHOTOS PAGE      */
/*==============================================*/

/* Tablet: slightly smaller tiles */
@media (max-width: 768px){
  .photos-grid{
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}

/*==============================================*/
/*    START OF CSS CODE FOR FULL PHOTO PAGE     */
/*==============================================*/
/* --<= 768px (tablets/phones)--- */
@media (max-width: 768px){

  .ix-full-photo-frame{
    padding: 14px;
    border-radius: 10px;
  }

  .ix-full-photo-frame .full-photo,
  .ix-full-photo-frame video{
    max-width: 100%;
    border-radius: 10px;     /* a little nicer on mobile */
  }

  /* If your ix-btn feels small on touch */
  .ix-full-photo-frame .ix-btn{
    min-height: 42px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/*==============================================*/
/*      START OF CSS CODE FOR GROUPS PAGE       */
/*==============================================*/
/* ====Mobile readiness===== */
@media (max-width: 768px){
  .ix-groups-frame{
    padding: 14px;
  }

  .ix-group-form{
    padding: 14px;
  }

  .group-card{
    flex: 1 1 calc(50% - 15px);
  }
}

/* ------------------------------------------------------------------------- */
/*        🔥 MOBILE-SPECIFIC STYLES FOR ACCRED COMMUNITY 🔥                 */
/* ------------------------------------------------------------------------- */

/* //////////////////////     🔥 Tablets (≤ 768px)     ///////////////////// */
@media (max-width: 768px) {

.ix-auth-card{
   width: 100%;
   max-width: 420px;
   padding: 24px 18px;
}
   .banner-content {
       flex-direction: row; /* Stack items */
       /*text-align: left;*/
    }

    .banner-left {
        flex-direction: left; /* Stack logo and text */
        align-items: center;
        margin-bottom: 10px;
    }

    .banner-right {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .sup-tm {
       font-size: 12px;
       position: relative;
       top: -.5em;
       font-weight: normal;
       color: inherit;
      }

    .signup-button {
        font-size: 14px;
        padding: 3px 3px;
     }

    .banner-title .site-name {
       font-size: 20px;
     }
          
    .banner-title .tagline {
        font-size: 12px;
     }
          
     .footer {
         font-size: 14px;
     }

 #dropdown-toggle svg {
    width: 30px !important;
    height: 30px;
  }

  .dropdown-menu {
    top: 60px;
    right: 10px;
  }

  #menu_buttons {
    font-size: 16px !important;
    padding: 4px 8px !important;
    margin: 2px 0px !important;
    line-height: 1.2 !important;
    height: 32px !important;
    min-height: unset !important;
    border: 1px solid #d3d3d3 !important;
    border-radius: 4px !important;
    /*width: 100% !important;*/
    text-align: center !important;
  }

  .site-name {
    margin-left: 0 !important;
  }

  .post-content-container p,
  .post-content-container a,
  .post-actions a {
    font-size: 14px !important;
  }

  .post-date {
    font-size: 12px !important;
  }

  .media-wrapper,
  .post-content-container img,
  .post-content-container video {
    max-width: 100%;
    width: 100% !important;
    height: auto;
    border-radius: 4px;
  }

  #community_post_form textarea,
  #community_post_form input[type="submit"] {
    width: 100% !important;
    font-size: 14px;
  }
}

/* NOTE: DUPLICATION ALERT ✅
   There are multiple @media (max-width: 768px) blocks for different features.
   I did NOT merge them. I left them as-is, grouped under the 768 bucket. */


/* ============================
   600 = small tablet / large phone
   ============================ */

/* ============Header responsive=Source: ixAccred_header_page.php================*/
/* =======================
   iPhone / small screens
   ======================= */
@media (max-width: 600px){

  .ix-header-inner{
    padding: 0 10px;
    gap: 8px;
  }

  /* make logo smaller */
  .ix-logo{
    font-size: 24px;
    padding: 6px 6px;
  }

  /* hide Logout text on mobile (move logout to dropdown if you want) */
  .ix-btn-link{
    display: none;
  }

  /* let search stretch */
  .ix-header-center{
    flex: 1 1 auto;
    min-width: 0;
  }

  .ix-search{
    max-width: none;  /* allow it to use available space */
    width: 100%;
  }

  .ix-search input{
    height: 30px;
    border-radius: 10px;
  }

  /* slightly smaller icon buttons */
  .ix-icon,
  #ix-menu-toggle{
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  #ix-profile-pic{
    width: 34px;
    height: 34px;
  }
}

/* Responsive: Adjust columns for smaller screens */
  @media (max-width: 600px) {
      .invite-container {
          grid-template-columns: repeat(1, 1fr); /* 1 column for mobile */
      }
  }

/* ==================Org Admin page================= */
  @media (max-width: 600px) {
    .user-info {
      flex-direction: column;
      align-items: flex-start;
    }
    .role-select {
      margin-top: 10px;
    }

    .owner-info-text {
        left: 0;
        top: 28px;
        transform: none;
        width: 240px;
    }

}


/* ============================
   560 = header layout wraps to 2 rows
   ============================ */

/* ============Header responsive=Source: ixAccred_header_page.php================*/
/* =======================
   iPhone layout: search becomes row 2
   ======================= */
@media (max-width: 560px){

  #ix-header{
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 8px 12px !important;
    row-gap: 10px !important;
  }

  /* Row 1 */
  .ix-header-left{
    order: 1 !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  .ix-header-right{
    order: 2 !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin-left: auto !important; /* pushes icons to the far right */
  }

  /* Row 2 (force full-width line break) */
  .ix-header-center{
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .ix-search{
    width: 100% !important;
    max-width: 100% !important;
  }

  .ix-search input{
    width: 100% !important;
  }

  /* Dropdown should sit below the header, even when it's 2 rows */
  #ix-dropdown{
    top: 100% !important;
  }

   /* Optional: if space is tight, hide Logout text on iPhone
     and keep Logout inside your dropdown menu instead */
  /* .ix-btn-link{ display:none; } */
}


/* ============================
   520 = (non-standard) Groups member grid
   (left as-is, but placed near phone sizes)
   ============================ */

/* ==================Groups responsive: ixAccred_group_styles.css================= */
@media (max-width: 520px){
  /* Responsive */
  .group-members-grid{ grid-template-columns: 1fr; }
}


/* ============================
   480 = phone
   ============================ */

/* ==================Groups responsive: ixAccred_group_styles.css================= */
@media (max-width: 480px){
  /* =========================================================
     Mobile readiness
     ========================================================= */

  .ixg-cover{
    max-height: 220px;
  }

  .ixg-title{
    font-size: 18px;
  }

  .ixg-menu-btn{
    width: 46%;
    min-width: 140px;
  }

  .ixg-cover-banner{ max-height: 220px; }

  .ixg-photo{ width: 100%; }
  .ixg-photo-img{ height: 200px; }

  .photos-grid img {
    width: 100%; /* One image per row on very small screens */
  }

  /* Mobile tightening */
  .ixg-denied{
    margin: 24px 10px;
    padding: 16px 14px 14px;
  }


}

/* Tight mobile tweak */
@media(max-width:480px){
    .link-preview{ flex-direction:column; }
    .link-preview img{
        width:100%;        /* full-width thumbnail on phones */
        height:auto;
        margin-bottom:8px;
    }
}

/* =====📱  PHONES (≤ 480 px)===============*/
@media(max-width:480px){
    #post{
        flex-direction:column;
        padding:14px 12px;
    }
    .post-image-container img{
        width:50px !important;
        height:50px !important;
        margin:0 0 6px 0;
    }
    .post-header{
        flex-direction:column;
        align-items:flex-start;
        gap:4px;
    }
    .edit-delete{
        align-self:flex-start;
        font-size:13px;
    }
    .post-actions{
        flex-wrap:wrap;
        gap:12px 20px;
        font-size:13px;
    }
    .post-actions a{
        margin-right:0;   /* wrap naturally */
    }

    .media-wrapper > img,
    .media-wrapper > video{
        width:100%;
        height:auto;
        display:block;
    }
}

/* ===== Likes Grid ===== */
@media (max-width: 480px) {
  .ix-likes-list {
    grid-template-columns: 1fr;
  }
}

/*==============================================*/
/*       START OF CSS CODE FOR PHOTOS PAGE      */
/*==============================================*/

/* Phone: bigger tiles, still fills full width */
@media (max-width: 480px){
  .photos-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columns on phones */
    gap: 10px;
  }
}

@media (max-width: 480px){
  .ix-edit-media-preview video{ max-height: 320px; }
}

/*==============================================*/
/*    START OF CSS CODE FOR FULL PHOTO PAGE     */
/*==============================================*/
/* ---<= 480px (phones)----- */
@media (max-width: 480px){

  .ix-full-photo-frame{
    padding: 12px;
    border-radius: 10px;
  }

  .ix-full-photo-frame .full-photo,
  .ix-full-photo-frame video{
    margin-bottom: 14px;     /* tighter on small screens */
  }

  /* Back button: make it easier to tap */
  .ix-full-photo-frame .ix-btn{
    width: 100%;
    max-width: 340px;        /* still centered and not huge */
  }
}

/*==============================================*/
/*      START OF CSS CODE FOR GROUPS PAGE       */
/*==============================================*/
@media (max-width: 480px){
  .ix-groups-frame{
    padding: 12px;
  }

  .ix-group-name,
  .ix-group-type{
    max-width: 100%;
  }

  .group-card{
    flex: 1 1 100%;
  }
}

/* =Groups include card (ixAccred_group_include_page.php)
   Namespaced to avoid collisions= */
@media (max-width: 480px){
  .ixg-cover{
    width: 52px;
    height: 52px;
  }
  .ixg-title{
    font-size: 13px;
  }
}

/* ------------------------------------------------------------------------- */
/*        🔥 MOBILE-SPECIFIC STYLES FOR ACCRED COMMUNITY 🔥                 */
/* ------------------------------------------------------------------------- */

/* //////////////////////     🔥 Smartphones (≤ 480px)     ///////////////////// */
@media (max-width: 480px) {

.ix-auth-card{
  padding: 20px 16px;
  border-radius: 8px;
}
  .banner-title .site-name{ 
   font-size:18px; 
  }

  .signup-button{ 
   padding:2px 6px; 
  }

  .footer{ 
   font-size:12px; 
  }

  #dropdown-toggle svg {
    width: 28px !important;
    height: 28px;
  }

  /*.menu-item img {
    width: 26px !important;
    height: auto;
  }*/

  /*.menu-item span {
    font-size: 14px !important;
  }*/

  .dropdown-menu {
    right: 10px;
  }

  #menu_buttons {
    font-size: 16px !important;
    padding: 4px 8px !important;
    margin: 2px 0px !important;
    line-height: 1.2 !important;
    height: 32px !important;
    min-height: unset !important;
    border: 1px solid #d3d3d3 !important;
    border-radius: 4px !important;
    /*width: 100% !important;*/
    text-align: center !important;
  }

   .site-name {
    margin-left: 0 !important;
  }

  .post-content-container p,
  .post-content-container a,
  .post-actions a {
    font-size: 13px !important;
  }

  .post-date {
    font-size: 12px !important;
  }

  .media-wrapper,
  .post-content-container img,
  .post-content-container video {
    max-width: 100%;
    width: 100% !important;
    height: auto;
    border-radius: 4px;
  }

  #community_post_form textarea,
  #community_post_form input[type="submit"] {
    width: 100% !important;
    font-size: 14px;
  }


/* --------------------------------
   Accreditation Reviews Table
-------------------------------- */

@media (max-width: 480px)

    .assignment-row {
        padding: 8px;
    }

    .assignment-row select {
        font-size: 13px;
    }
}

/* =========================================================
                 🔥 Policy Update Page Styles 🔥
   ======================================================= */
/* === Policy Accept page (mobile-first) === */

@media(max-width:480px){
  #policy_accept{margin:10px auto;padding:16px;}
  .policy-consent{font-size:17px;}
  .accept-policy-button{width:100%;padding:14px 18px;font-size:17px;}
}

/* NOTE: DUPLICATION ALERT ✅
   Multiple @media (max-width: 480px) blocks exist for different components.
   I left them separate (not merged) and grouped them under the 480 bucket. */


/* ============================
   360 = tiny phone
   ============================ */

/* ==================Groups responsive: ixAccred_group_styles.css================= */
@media (max-width: 360px){
  .ixg-cover{
    max-height: 200px;
  }

  .ixg-title{
    font-size: 16px;
  }

  .ixg-menu-btn{
    width: 100%;
  }
}

/*==============================================*/
/*       START OF CSS CODE FOR PHOTOS PAGE      */
/*==============================================*/

/* Optional: very small phones */
@media (max-width: 360px){
  .photos-grid{
    grid-template-columns: 1fr; /* 1 column if super narrow */
  }
}

/*==============================================*/
/*    START OF CSS CODE FOR FULL PHOTO PAGE     */
/*==============================================*/
/* ----<= 360px (small phones)---- */
@media (max-width: 360px){

  .ix-full-photo-frame{
    padding: 10px;
  }

  .ix-full-photo-frame .full-photo,
  .ix-full-photo-frame video{
    border-radius: 8px;
  }

  .ix-full-photo-frame .ix-btn{
    max-width: 100%;
    font-size: 14px;
  }
}

/*==============================================*/
/*      START OF CSS CODE FOR GROUPS PAGE       */
/*==============================================*/
@media (max-width: 360px){
  .ix-group-form{
    padding: 12px;
  }

  .ix-group-name,
  .ix-group-type{
    height: 42px;
    font-size: 13px;
  }
}


/* ============================
   MIN-WIDTH bucket
   (kept intact, placed at end)
   ============================ */

@media(min-width:768px){
  #policy_accept h1{font-size:24px;}
  #policy_accept p {font-size:16px;}
}
