/*
 * Окна портала и кабинета — в виде «Площадок» и «Групп» (static/rbui.css):
 * кремовая карточка #fffdfa, скругление 24, светлая шапка с бежевой линией
 * вместо цветного градиента, поля и кнопки-пилюли, оранжевая главная кнопка.
 *
 * Окон в портале десятки, и свёрстаны они пятью способами (w3-modal +
 * case-modal, report-modal, rbx-modal, tr-/wl-modal, modal-dialog). Править
 * каждое значило бы десятки копий одного вида, и первая же новая модалка
 * осталась бы прежней. Поэтому вид задаёт этот файл — по классам окон.
 *
 * Подключается в обеих шапках (header.php и private/header.php). Стили
 * страниц печатаются позже, поэтому правила здесь сильнее: «html body»
 * впереди, а цветной фон шапки, заданный атрибутом style, снимается
 * !important. Окна .rbu-modal / .rbu-drawer этот файл не трогает — они и
 * так из rbui.css.
 *
 * Тест: php tests/rbmodal.test.php
 */

/* Подложка */
html body .w3-modal{background-color:rgba(27,22,19,.32)!important}
html body .report-modal,html body .rr-modal,html body .rbx-modal-ov,
html body .tr-ov,html body .wl-ov,html body .modal-overlay{background:rgba(27,22,19,.32)!important}

/* Карточка окна */
html body .w3-modal-content,
html body .case-modal,
html body .report-modal-inner,
html body .rr-modal-inner,
html body .rbx-modal,
html body .tr-modal,
html body .wl-modal,
html body .modal-dialog{background:#fffdfa!important;border:none!important;border-radius:24px!important;box-shadow:0 20px 60px rgba(27,22,19,.22)!important;font-family:'Gilroy-Medium','Manrope',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;color:#000}
html body .w3-modal-content.w3-card-4{box-shadow:0 20px 60px rgba(27,22,19,.22)!important}

/* Шапка: светлая, заголовок тёмный, линия снизу. Цветные градиенты шапок
   стояли у каждого окна своим (зелёный, фиолетовый, оранжевый, синий) —
   рядом с карточками «Площадок» окно читалось чужим */
html body .case-modal__header,
html body .report-modal-header,
html body .rr-modal-header,
html body .rbx-modal__h,
html body .tr-modal__h,
html body .wl-modal__h,
html body .modal-header-blue,
html body .modal-header-amber,
html body .w3-modal-content > header.w3-container{background:#fffdfa!important;background-image:none!important;color:#000!important;border-bottom:2px solid #f3e7d6!important;padding:18px 24px!important;display:flex;align-items:center;gap:12px}
html body .case-modal__header h1,html body .case-modal__header h2,html body .case-modal__header h3,html body .case-modal__header h4,
html body .report-modal-header h3,html body .rr-modal-header h3,
html body .rbx-modal__h h3,html body .rbx-modal__h h2,
html body .tr-modal__h h3,html body .wl-modal__h h3,
html body .w3-modal-content > header.w3-container h2,html body .w3-modal-content > header.w3-container h3,html body .w3-modal-content > header.w3-container h4{margin:0;flex:1 1 auto;min-width:0;font-family:'Gilroy-ExtraBold','Gilroy-Bold','Manrope',system-ui,sans-serif!important;font-size:22px!important;line-height:1.25!important;font-weight:800!important;color:#000!important}
html body .case-modal__header .fa,html body .case-modal__header .fas,html body .case-modal__header i,
html body .report-modal-header i,html body .rbx-modal__h i,html body .tr-modal__h i,html body .wl-modal__h i{color:#ed6b10!important}
html body .case-modal__header small,html body .case-modal__header p,html body .rbx-modal__h p,html body .rbx-modal__h small{color:#5b5b5b!important}

/* Крестик — круглая кнопка, как в боковой панели «Площадок» */
html body .case-modal__close,
html body .report-modal-close,
html body .rr-modal-close,
html body .rbx-modal__x,
html body .tr-modal__x,
html body .wl-modal__x,
html body .modal-close,
html body .w3-modal-content > header .w3-display-topright{position:static!important;flex:none;width:44px!important;height:44px!important;margin-left:auto;padding:0!important;border:none!important;border-radius:999px!important;background:transparent!important;color:#5b5b5b!important;font-size:22px!important;line-height:1!important;display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer;transform:none!important;box-shadow:none!important}
html body .case-modal__close:hover,html body .report-modal-close:hover,html body .rr-modal-close:hover,
html body .rbx-modal__x:hover,html body .tr-modal__x:hover,html body .wl-modal__x:hover,html body .modal-close:hover,
html body .w3-modal-content > header .w3-display-topright:hover{background:#fff3e6!important;color:#000!important}

/* Тело и подвал */
html body .case-modal__body,html body .report-modal-body,html body .rr-modal-body,
html body .rbx-modal__b,html body .tr-modal__b,html body .wl-modal__b{padding:20px 24px!important;color:#1b1613}
html body .case-modal__footer,html body .rbx-modal__f,html body .w3-modal-content > footer.w3-container,html body .modal-actions{border-top:2px solid #f3e7d6!important;padding:14px 24px!important;background:#fffdfa!important;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px}

/* Подписи и поля — как rbu-field / rbu-in */
html body :is(.case-modal__body,.report-modal-body,.rr-modal-body,.rbx-modal__b,.tr-modal__b,.wl-modal__b,.w3-modal-content) label{color:#5b5b5b;font-size:14px}
html body :is(.case-modal__body,.report-modal-body,.rr-modal-body,.rbx-modal__b,.tr-modal__b,.wl-modal__b,.w3-modal-content) label b{color:#1b1613}
html body :is(.case-modal__body,.report-modal-body,.rr-modal-body,.rbx-modal__b,.tr-modal__b,.wl-modal__b,.w3-modal-content) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),textarea,select){border:2px solid #f3e7d6!important;border-radius:12px!important;background-color:#fffdfa!important;color:#000;box-shadow:none!important;outline:none;min-height:44px}
html body :is(.case-modal__body,.report-modal-body,.rr-modal-body,.rbx-modal__b,.tr-modal__b,.wl-modal__b,.w3-modal-content) textarea{min-height:96px}
html body :is(.case-modal__body,.report-modal-body,.rr-modal-body,.rbx-modal__b,.tr-modal__b,.wl-modal__b,.w3-modal-content) :is(input,textarea,select):focus{border-color:#ed6b10!important;background-color:#fff!important}
html body :is(.case-modal__body,.report-modal-body,.rr-modal-body,.rbx-modal__b,.tr-modal__b,.wl-modal__b,.w3-modal-content) :is(input[type=checkbox],input[type=radio]){accent-color:#ed6b10}

/* Кнопки внутри окон: пилюли. Цветная — главная (оранжевая), серая и
   белая — вторичная с бежевой рамкой, красная остаётся красной */
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) .w3-button{border-radius:999px!important;min-height:40px;padding:0 18px!important;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:'Gilroy-Bold','Manrope',system-ui,sans-serif;font-weight:800;font-size:15px;border:2px solid transparent!important;box-shadow:none!important}
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) :is(.w3-green,.w3-blue,.w3-orange,.w3-deep-orange,.w3-teal,.w3-indigo,.w3-amber,.w3-purple,.w3-deep-purple,.w3-light-green,.w3-lime,.w3-cyan,.w3-light-blue).w3-button{background:#ed6b10!important;color:#fff!important}
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) :is(.w3-green,.w3-blue,.w3-orange,.w3-deep-orange,.w3-teal,.w3-indigo,.w3-amber,.w3-purple,.w3-deep-purple,.w3-light-green,.w3-lime,.w3-cyan,.w3-light-blue).w3-button:hover{background:#c75a0c!important}
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) :is(.w3-light-grey,.w3-grey,.w3-white,.w3-border,.w3-pale-red,.w3-pale-green,.w3-pale-yellow,.w3-pale-blue).w3-button{background:#fff!important;color:#1b1613!important;border-color:#f3e7d6!important}
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) :is(.w3-light-grey,.w3-grey,.w3-white,.w3-border,.w3-pale-red,.w3-pale-green,.w3-pale-yellow,.w3-pale-blue).w3-button:hover{background:#fff3e6!important}
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) .w3-red.w3-button{background:#e63612!important;color:#fff!important}
html body :is(.w3-modal-content,.report-modal-inner,.rr-modal-inner,.rbx-modal,.tr-modal,.wl-modal,.modal-dialog) .w3-button:disabled{opacity:.5}

/* Панели-сообщения внутри окон */
html body :is(.w3-modal-content,.report-modal-inner,.rbx-modal) .w3-panel{border-radius:16px}

/* Вкладки внутри окна «Уроки» (Уроки / Журнал) и переключатель режима
   журнала — сегментом «Площадок»: пилюли, выбранное жёлтым */
html body .lessons-tabs{display:inline-flex!important;flex-wrap:wrap;gap:4px!important;padding:4px;background:#fffdfa;border:2px solid #f3e7d6;border-radius:999px}
html body .lessons-tabs > button{height:40px;border:none!important;border-radius:999px!important;background:transparent!important;color:#5b5b5b!important;font-size:15px;font-weight:700!important;padding:0 16px!important}
html body .lessons-tabs > button:hover{background:#fff3e6!important;color:#1b1613!important}
html body .lessons-tabs > button.on{background:#fcc000!important;color:#000!important}
html body .lessons-tabs > button.on i{color:#000!important}
html body .lessons-tabs > button i{color:#ed6b10}
html body .lessons-tabs > .journal-btn{background:#fff!important;border:2px solid #f3e7d6!important;color:#1b1613!important}

@media (max-width:640px){
  html body .case-modal__header,html body .report-modal-header,html body .rr-modal-header,
  html body .rbx-modal__h,html body .tr-modal__h,html body .wl-modal__h{padding:14px 16px!important}
  html body .case-modal__body,html body .report-modal-body,html body .rr-modal-body,
  html body .rbx-modal__b,html body .tr-modal__b,html body .wl-modal__b{padding:16px!important}
  html body .case-modal__footer,html body .rbx-modal__f{padding:12px 16px!important}
  html body .case-modal__header h3,html body .report-modal-header h3,html body .rbx-modal__h h3,
  html body .tr-modal__h h3,html body .wl-modal__h h3{font-size:19px!important}
}
