/* Mobile-specific responsive styles for CIBC Investor's Edge */

/* Desktop styles (> 900px) */
@media (min-width: 900px) {
  /* Hide mobile layout, show desktop */
  .mobile-layout {
    display: none !important;
  }
  
  .desktop-layout {
    display: block !important;
  }
  
  /* Hide mobile header, show desktop */
  .mobile-header {
    display: none !important;
  }
  
  .desktop-header {
    display: block !important;
  }
  
  /* Hide mobile footer, show desktop */
  .mobile-footer {
    display: none !important;
  }
  
  .desktop-footer {
    display: block !important;
  }
}

/* Mobile styles (< 900px) */
@media (max-width: 899px) {
  /* Show mobile layout, hide desktop */
  .mobile-layout {
    display: block !important;
  }
  
  .desktop-layout {
    display: none !important;
  }
  
  /* Show mobile header, hide desktop */
  .mobile-header {
    display: flex !important;
    align-items: center;
    height: 48px;
    max-width: 600px;
    min-width: 320px;
    margin: 0 auto;
  }
  
  .desktop-header {
    display: none !important;
  }
  
  .ie-header,
  .ie-preheader {
    display: none !important;
  }
  
  /* Show mobile footer, hide desktop */
  .mobile-footer {
    display: block !important;
  }
  
  .desktop-footer {
    display: none !important;
  }
  
  /* Mobile: Show page-top with lock icon and "Sign on" title */
  .page-top {
    display: block !important;
    margin-top: 20px;
    padding: 20px 15px 15px;
    border-top: 1px solid #dddddd;
    border-left: 1px solid #dddddd;
    border-right: 1px solid #dddddd;
    margin-bottom: 0;
    max-width: 100%;
  }
  
  /* Single column layout */
  .main-content-two-col {
    display: block;
    max-width: 100%;
  }
  
  .content-padding {
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 20px;
  }
  
  /* Left column visible, contains form - WIDER for mobile */
  .left-col-bright {
    padding: 0px 20px 20px;
    border-bottom: 1px solid #dddddd;
    border-left: 1px solid #dddddd;
    border-right: 1px solid #dddddd;
    display: block !important;
    max-width: 100%;
    width: 100%;
  }
  
  /* Make form container full width on mobile */
  .mobile-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .mobile-layout .signOn_container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Override form container centering */
  .signOn_container {
    display: block !important;
    justify-content: normal !important;
    align-items: normal !important;
  }
  
  /* Make all form containers full width */
  form,
  .main-content-two-col,
  .content-padding {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  .left-inner-content {
    padding: 0;
    border-right: none;
    width: 100% !important;
  }
  
  /* Hide right column completely on mobile */
  .right-col-bright {
    display: none !important;
  }
  
  /* Remove container height restrictions */
  .signOn_container {
    height: auto !important;
    min-height: auto !important;
  }
  
  /* Mobile form styling */
  .page-bottom-button-container {
    width: 100%;
    margin: 16px 0 0 0;
  }
  
  .page-bottom-right-button-group-reversing {
    width: 100%;
    float: none;
  }
  
  .page-bottom-left-button-group.registerBtn {
    width: 100%;
    margin-top: 10px;
    padding-right: 0;
    height: auto;
  }
  
  .button.primary,
  .button.secondary {
    width: 100%;
    height: 48px;
  }
  
  /* Mobile inputs */
  input[type="text"],
  input[type="password"] {
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Mobile header styling */
  .ie-cibcLogo-left {
    flex-grow: 1;
    margin-left: 15px;
  }
  
  .cibcmobile-img {
    height: 20px;
    border: none;
  }
  
  .ie-signon-help-link {
    font-size: 24px;
    padding: 12px 13px;
    margin-right: 2px;
  }
  
  .ie-signon-help-link::before {
    color: #383b3e;
  }
  
  /* Mobile footer styling */
  .mobile-footer .vendorIcons {
    text-align: center;
    margin-bottom: 24px;
  }
  
  .mobile-footer .vendorIcon1 {
    display: inline-block;
    vertical-align: middle;
    margin-right: 40px;
    opacity: 0.6;
  }
  
  .mobile-footer .vendorIcon2 {
    display: inline-block;
    vertical-align: middle;
    opacity: 0.6;
  }
  
  .mobile-footer .footer-links {
    margin-bottom: 32px;
    text-align: center;
  }
  
  .mobile-footer .footer-links a {
    color: #606366;
    font-size: 12px;
    line-height: 1.4;
    font-family: Arial;
    font-weight: normal;
    text-decoration: underline;
  }
  
  .mobile-footer .footer-links a:first-child {
    margin-right: 16px;
  }
}

/* ========================================
   Input field styling - WHITE background
   ======================================== */

/* All text inputs should have white background */
input[type="text"],
input[type="password"],
input.soft,
input.input_style-ie,
.input_style-ie {
  background-color: #ffffff !important;
  color: #333333 !important;
}

/* Desktop form inputs */
.desktop-layout input[type="text"],
.desktop-layout input[type="password"],
.right-col-bright-ie input[type="text"],
.right-col-bright-ie input[type="password"] {
  background-color: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #dddddd !important;
}

/* Mobile form inputs */
.mobile-layout input[type="text"],
.mobile-layout input[type="password"],
.left-col-bright input[type="text"],
.left-col-bright input[type="password"] {
  background-color: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #dddddd !important;
}

/* Focus state */
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #8a1538 !important;
  box-shadow: 0 0 0 2px rgba(138, 21, 56, 0.2) !important;
  outline: none !important;
}

/* Placeholder text */
input::placeholder {
  color: #999999 !important;
}

/* ========================================
   Fix broken icon fonts (font files missing)
   ======================================== */

/* Hide icomoon font icons to prevent showing squares when font is missing */
/* This only affects icon fonts, not SVG images */
.icon-Question:before,
.icon-Shield:before,
.icon-Out-of-App:before,
[class^="icon-"]:before,
[class*=" icon-"]:before {
  content: '' !important;
  display: none !important;
}

/* SVG images (like Lock_sso.svg, password icons) will display normally */
