/* Rosconvert interaction states: loading, success, errors and result downloads. */

/* Shared status containers */
body .converter-status,
body .seo-tool__status,
body .utility-page__error,
body .site-main #result .file-item{
  position:relative;
  overflow:hidden;
  border-width:1px!important;
  border-style:solid!important;
  border-radius:10px!important;
  box-shadow:none!important;
}

body .converter-status,
body .seo-tool__status{
  min-height:48px;
  padding:13px 14px 13px 44px!important;
  font-size:14px!important;
  line-height:1.55!important;
}

body .converter-status::before,
body .seo-tool__status::before{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:50%;
  font-size:12px;
  font-weight:800;
  line-height:1;
}

body .converter-status.is-working,
body .seo-tool__status:not(.ok):not(.error).is-visible{
  border-color:#d9def5!important;
  background:#f6f7ff!important;
  color:#4c59a7!important;
}
body .converter-status.is-working::before,
body .seo-tool__status:not(.ok):not(.error).is-visible::before{
  content:"";
  border:2px solid #d4d9f4;
  border-top-color:#6070dd;
  animation:rc-status-spin .75s linear infinite;
}

body .converter-status.is-success,
body .seo-tool__status.ok{
  border-color:#cfe5d7!important;
  background:#f1f8f3!important;
  color:#176b46!important;
}
body .converter-status.is-success::before,
body .seo-tool__status.ok::before{
  content:"✓";
  background:#d9efe1;
  color:#16734a;
}

body .converter-status.is-error,
body .seo-tool__status.error,
body .utility-page__error{
  border-color:#ebd0ca!important;
  background:#fff5f2!important;
  color:#984235!important;
}
body .converter-status.is-error::before,
body .seo-tool__status.error::before{
  content:"!";
  background:#f6dcd6;
  color:#a34135;
}

/* Result/download actions */
body .converter-status a,
body .seo-tool__status a,
body .site-main #result a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  margin:8px 0 0 10px!important;
  padding:9px 14px!important;
  border:1px solid #bcdac8!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#176b46!important;
  font-size:13px!important;
  font-weight:750!important;
  text-decoration:none!important;
  box-shadow:0 2px 6px rgba(25,100,67,.05)!important;
  transition:background .15s ease,border-color .15s ease,transform .12s ease!important;
}
body .converter-status a::before,
body .seo-tool__status a::before,
body .site-main #result a::before{
  content:"↓";
  margin-right:7px;
  font-size:15px;
  line-height:1;
}
body .converter-status a:hover,
body .seo-tool__status a:hover,
body .site-main #result a:hover{
  border-color:#9bcaae!important;
  background:#f7fcf8!important;
  transform:translateY(-1px);
}

/* Progress */
body .converter-progress,
body .site-main #progress-wrap{
  height:7px!important;
  margin-top:12px!important;
  overflow:hidden!important;
  border-radius:999px!important;
  background:#eceff6!important;
}
body .converter-progress span{
  border-radius:999px;
  background:linear-gradient(90deg,#6574ec,#8290ef)!important;
  box-shadow:0 0 10px rgba(101,116,236,.20);
}
body .site-main #progress-bar{
  border-radius:999px!important;
  background:linear-gradient(90deg,#6574ec,#6ec3b1)!important;
}

/* Disabled/loading buttons should still look intentional. */
body .converter-btn:disabled,
body .seo-tool__convert:disabled,
body .utility-page__button:disabled,
body .site-main .convert-btn:disabled{
  opacity:1!important;
  background:#aeb6cb!important;
  color:#fff!important;
  cursor:wait!important;
  transform:none!important;
  box-shadow:none!important;
}

/* Selected file feedback */
body .converter-file-meta,
body .utility-page__filename,
body .seo-tool__meta{
  transition:color .15s ease,background .15s ease;
}
body .converter-drop:focus-within,
body .utility-page__drop:focus-within,
body .seo-tool__drop:focus-within{
  border-color:#7483e1!important;
  box-shadow:0 0 0 4px rgba(101,116,236,.08)!important;
}

/* Legacy result item */
body .site-main #result .file-item{
  padding:13px 14px!important;
  border-color:#dfe4ec!important;
  background:#fbfcfe!important;
}
body .site-main #result .file-name{
  color:#303747!important;
  font-size:13.5px!important;
  font-weight:750!important;
  overflow-wrap:anywhere;
}

@keyframes rc-status-spin{to{transform:translateY(-50%) rotate(360deg)}}

@media(max-width:700px){
  body .converter-status,
  body .seo-tool__status{
    padding:12px 12px 12px 40px!important;
    font-size:13.5px!important;
  }
  body .converter-status::before,
  body .seo-tool__status::before{
    left:12px;
  }
  body .converter-status a,
  body .seo-tool__status a,
  body .site-main #result a{
    display:flex!important;
    width:100%!important;
    min-height:46px!important;
    margin:10px 0 0!important;
    padding:10px 12px!important;
    text-align:center!important;
  }
  body .site-main #result .file-item{
    padding:12px!important;
  }
}

/* Mobile navigation polish: clearer hierarchy and safer tap targets. */
@media(max-width:1120px){
  body.header-menu-open::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:275;
    background:rgba(28,34,51,.24);
    backdrop-filter:blur(1px);
    -webkit-backdrop-filter:blur(1px);
    pointer-events:none;
  }
  body .site-header{z-index:320!important}
  body .menu-toggle{position:relative!important;z-index:340!important;width:44px!important;height:44px!important;border:1px solid #e0e4ee!important;border-radius:10px!important;background:#fff!important;box-shadow:0 2px 8px rgba(35,45,65,.04)!important}
  body.header-menu-open .menu-toggle{border-color:#cfd5ef!important;background:#eef1ff!important;color:#4e5fc9!important}
  body .main-converter-menu{z-index:330!important;border-top:1px solid #e7eaf1!important;background:#fff!important;box-shadow:0 18px 36px rgba(31,41,65,.16)!important}
  body .main-converter-menu>ul{padding:8px 12px max(22px,env(safe-area-inset-bottom))!important}
  body .main-converter-menu>ul>li{margin:0!important;border-bottom:1px solid #eceff4!important}
  body .main-converter-menu>ul>li:first-child>a,body .main-converter-menu summary{min-height:52px!important;padding:12px 10px!important;border-radius:8px!important;font-size:15px!important;line-height:1.35!important}
  body .main-converter-menu>ul>li:first-child>a{color:#4c5dcc!important;font-weight:750!important}
  body .main-converter-menu details[open]>summary{background:#f3f5ff!important;color:#4c5dcc!important}
  body .main-converter-menu .dropdown{margin:0 4px 10px 30px!important;padding:4px 0 4px 10px!important;border:0!important;border-left:2px solid #dfe4f5!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
  body .main-converter-menu .dropdown a{min-height:44px!important;margin:2px 0!important;padding:10px 12px!important;border-radius:7px!important;background:#fff!important;color:#4b5567!important;font-size:14px!important}
  body .main-converter-menu .dropdown a:hover,body .main-converter-menu .dropdown a.is-current{background:#f2f4ff!important;color:#4c5dcc!important}
}

@media(max-width:600px){
  body .site-brand__sub{display:none!important}
  body .site-brand{font-size:21px!important}
  body .main-converter-menu>ul{padding-left:9px!important;padding-right:9px!important}
  body .main-converter-menu .dropdown{margin-left:25px!important}
}

@media(prefers-reduced-motion:reduce){
  body .converter-status.is-working::before,body .seo-tool__status:not(.ok):not(.error).is-visible::before{animation:none}
  body.header-menu-open::before{backdrop-filter:none;-webkit-backdrop-filter:none}
}

/* Utility navigation polish */
body .sidebar{background:transparent!important}
body .sidebar__head{margin:0 0 18px!important;padding:18px 18px 16px!important;border:1px solid #e7eaf2!important;border-radius:16px!important;background:linear-gradient(180deg,#fbfcff 0%,#f7f9ff 100%)!important;box-shadow:0 8px 24px rgba(42,55,94,.05)!important}
body .sidebar__title{margin:0!important;padding:0!important;border:0!important;color:#2f3852!important;font-size:18px!important;font-weight:800!important;line-height:1.25!important;letter-spacing:-.01em!important;text-transform:none!important}
body .sidebar__sub{margin:6px 0 0!important;color:#7a8499!important;font-size:12.5px!important;line-height:1.45!important}
body .utility-section{margin:0 0 16px!important;padding:0 10px 8px!important;border:1px solid #e7eaf1!important;border-radius:16px!important;background:#fff!important;box-shadow:0 6px 20px rgba(42,55,94,.045)!important;overflow:hidden!important}
body .utility-section__title{margin:0 -10px 6px!important;padding:13px 16px 11px!important;border:0!important;border-bottom:1px solid #edf0f5!important;background:#f8f9fd!important;color:#4b5670!important;font-size:12px!important;font-weight:800!important;line-height:1.2!important;letter-spacing:.06em!important;text-transform:uppercase!important}
body .utility-list{display:block!important}
body .utility-link{position:relative!important;display:grid!important;grid-template-columns:30px minmax(0,1fr) 18px!important;align-items:center!important;gap:9px!important;min-height:48px!important;margin:0!important;padding:8px 8px!important;border:0!important;border-bottom:1px solid #f0f2f6!important;border-radius:10px!important;background:transparent!important;color:#465168!important;text-decoration:none!important;transition:background .15s ease,color .15s ease,transform .15s ease!important}
body .utility-link:last-child{border-bottom-color:transparent!important}
body .utility-link::before{content:""!important;display:none!important}
body .utility-link::after{content:"›"!important;position:static!important;display:grid!important;place-items:center!important;width:18px!important;height:18px!important;color:#b3bbca!important;font-size:20px!important;font-weight:400!important;line-height:1!important}
body .utility-icon{display:grid!important;place-items:center!important;width:30px!important;height:30px!important;min-width:30px!important;border-radius:9px!important;background:#f2f4fb!important;color:#5565d8!important;font-size:16px!important;line-height:1!important}
body .utility-name{min-width:0!important;color:inherit!important;font-size:13.5px!important;font-weight:600!important;line-height:1.35!important}
body .utility-link:hover{background:#f7f8ff!important;color:#4d5fd3!important;transform:translateX(2px)!important}
body .utility-link:hover::after{color:#6574ec!important}
body .utility-link.is-current{background:#eef1ff!important;color:#4f60d4!important;font-weight:700!important}
body .utility-link.is-current .utility-icon{background:#dfe5ff!important;color:#4658cf!important}
body .utility-link.is-current::after{color:#5263d7!important}

@media(max-width:1120px){
  body .site-shell{gap:22px!important}
  body .sidebar{width:100%!important;margin-top:6px!important}
  body .sidebar__head{margin-bottom:14px!important}
  body .utility-section{margin-bottom:14px!important}
}

@media(max-width:600px){
  body .site-shell{width:100%!important;padding-left:14px!important;padding-right:14px!important}
  body .sidebar__head{padding:16px!important;border-radius:14px!important}
  body .sidebar__title{font-size:17px!important}
  body .sidebar__sub{font-size:12px!important}
  body .utility-section{padding:0 8px 6px!important;border-radius:14px!important}
  body .utility-section__title{margin-left:-8px!important;margin-right:-8px!important;padding:12px 14px 10px!important;font-size:11.5px!important}
  body .utility-link{grid-template-columns:28px minmax(0,1fr) 16px!important;gap:8px!important;min-height:46px!important;padding:7px 6px!important}
  body .utility-icon{width:28px!important;height:28px!important;min-width:28px!important;border-radius:8px!important;font-size:15px!important}
  body .utility-name{font-size:13.5px!important}
  body .back-to-top{right:14px!important;bottom:max(14px,env(safe-area-inset-bottom))!important;width:42px!important;height:42px!important;border-radius:12px!important;box-shadow:0 8px 22px rgba(35,45,65,.12)!important}
}

/* Mobile utility typography rebalance */
@media(max-width:600px){
  body .sidebar__head{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:118px!important;
    padding:20px 16px 18px!important;
    text-align:center!important;
  }
  body .sidebar__title{
    width:100%!important;
    font-size:22px!important;
    font-weight:800!important;
    line-height:1.18!important;
    letter-spacing:-.02em!important;
    text-align:center!important;
  }
  body .sidebar__sub{
    width:100%!important;
    margin-top:8px!important;
    font-size:15px!important;
    line-height:1.35!important;
    text-align:center!important;
  }
  body .utility-section__title{
    padding:15px 16px 13px!important;
    font-size:16px!important;
    line-height:1.2!important;
    letter-spacing:.035em!important;
  }
  body .utility-link{
    min-height:62px!important;
    padding:9px 8px!important;
  }
  body .utility-name{
    font-size:17px!important;
    font-weight:650!important;
    line-height:1.28!important;
  }
}
