/* Stage 8: shared Type 2 informational / operational bottom sheets. */

#bottom_sheet_meet_detail,
#bottom_sheet_application_details,
#bottom_sheet_absence_submit,
#bottom_sheet_absence_cancel,
#bottom_sheet_meet_rating {
    background: var(--ui-surface, #ffffff) !important;
    color: var(--ui-text, #333333);
}

/* Type 2 has no visible drag handle. Swipe-down dismiss remains owned by bottom_sheet.php. */
#bottom_sheet_meet_detail [data-bottom-sheet-drag-handle],
#bottom_sheet_application_details [data-bottom-sheet-drag-handle],
#bottom_sheet_absence_submit [data-bottom-sheet-drag-handle],
#bottom_sheet_absence_cancel [data-bottom-sheet-drag-handle],
#bottom_sheet_meet_rating [data-bottom-sheet-drag-handle] {
    display: none !important;
}

/* White-surface close control: 44px hit area, no permanent circle. */
#bottom_sheet_absence_submit .bottom-sheet-header [data-bottom-sheet-close],
#bottom_sheet_meet_rating .bottom-sheet-header [data-bottom-sheet-close],
#bottom_sheet_meet_detail .p-modal-meet-detail__close,
#bottom_sheet_application_details .p-modal-meet-detail__close,
#bottom_sheet_absence_cancel .c-type2-inline-close {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--radius-control, 12px) !important;
    background: transparent !important;
    color: var(--ui-text-secondary, #636363) !important;
    box-shadow: none !important;
}

#bottom_sheet_absence_submit .bottom-sheet-header [data-bottom-sheet-close]:hover,
#bottom_sheet_absence_submit .bottom-sheet-header [data-bottom-sheet-close]:active,
#bottom_sheet_meet_rating .bottom-sheet-header [data-bottom-sheet-close]:hover,
#bottom_sheet_meet_rating .bottom-sheet-header [data-bottom-sheet-close]:active,
#bottom_sheet_meet_detail .p-modal-meet-detail__close:hover,
#bottom_sheet_meet_detail .p-modal-meet-detail__close:active,
#bottom_sheet_application_details .p-modal-meet-detail__close:hover,
#bottom_sheet_application_details .p-modal-meet-detail__close:active,
#bottom_sheet_absence_cancel .c-type2-inline-close:hover,
#bottom_sheet_absence_cancel .c-type2-inline-close:active {
    background: var(--ui-page-bg, #f6f6f6) !important;
}

#bottom_sheet_absence_submit .bottom-sheet-header > div,
#bottom_sheet_meet_rating .bottom-sheet-header > div {
    min-height: 48px;
    padding: 4px 6px 0 !important;
}

#bottom_sheet_meet_detail .bottom-sheet-header,
#bottom_sheet_application_details .bottom-sheet-header,
#bottom_sheet_absence_cancel .bottom-sheet-header {
    display: none !important;
}

#bottom_sheet_meet_detail .bottom-sheet-content,
#bottom_sheet_application_details .bottom-sheet-content,
#bottom_sheet_absence_submit .bottom-sheet-content,
#bottom_sheet_absence_cancel .bottom-sheet-content,
#bottom_sheet_meet_rating .bottom-sheet-content {
    min-height: 0;
    background: var(--ui-surface, #ffffff);
}

.c-type2-operation-title {
    margin: 0;
    color: var(--ui-text, #333333);
    font-size: var(--type-section-title-size, 16px);
    font-weight: var(--type-section-title-weight, 700);
    line-height: var(--type-section-title-line-height, 1.35);
    text-align: center;
}

.c-type2-operation-helper {
    max-width: 310px;
    margin: 7px auto 0;
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-helper-size, 12px);
    font-weight: var(--type-helper-weight, 500);
    line-height: var(--type-helper-line-height, 1.4);
    text-align: center;
}

.c-type2-identity {
    margin-top: var(--space-16, 16px);
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.c-type2-identity__title {
    margin: 0;
    color: var(--ui-text, #333333);
    font-size: var(--type-activity-title-size, 13px);
    font-weight: var(--type-activity-title-weight, 700);
    line-height: var(--type-activity-title-line-height, 1.2);
}

.c-type2-identity__meta {
    margin: 5px 0 0;
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-activity-meta-size, 11px);
    font-weight: var(--type-activity-meta-weight, 500);
    line-height: var(--type-activity-meta-line-height, 1.25);
}

.c-type2-data-hooks {
    display: none !important;
}

.c-type2-facts {
    overflow: hidden;
    margin-top: 18px;
    border: 0;
    border-radius: var(--radius-card, 16px);
    background: var(--ui-page-bg, #f6f6f6);
    box-shadow: none;
}

.c-type2-fact {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-12, 12px);
    padding: 10px var(--space-12, 12px);
    border: 0;
    background: transparent;
}

.c-type2-fact + .c-type2-fact {
    border-top: 1px solid var(--ui-line, #ececec);
}

.c-type2-fact[hidden] {
    display: none !important;
}

.c-type2-fact__label {
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-activity-meta-size, 11px);
    font-weight: var(--type-activity-meta-weight, 500);
    line-height: var(--type-activity-meta-line-height, 1.25);
}

.c-type2-fact__value {
    color: var(--ui-text, #333333);
    font-size: var(--type-activity-meta-size, 11px);
    font-weight: 700;
    line-height: var(--type-activity-meta-line-height, 1.25);
    text-align: right;
}

.c-type2-notice {
    margin: var(--space-16, 16px) 0 0;
    padding: 11px var(--space-12, 12px);
    border: 0;
    border-radius: var(--radius-control, 12px);
    background: var(--ui-page-bg, #f6f6f6);
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-helper-size, 12px);
    font-weight: var(--type-helper-weight, 500);
    line-height: var(--type-helper-line-height, 1.4);
    text-align: left;
}

.c-type2-notice[hidden] {
    display: none !important;
}

.c-type2-actions {
    display: flex;
    gap: var(--space-8, 8px);
    margin-top: 20px;
}

.c-type2-actions > button,
.c-type2-action {
    min-height: 48px !important;
    border-radius: var(--radius-control, 12px) !important;
    box-shadow: none !important;
    font-size: var(--type-button-size, 14px) !important;
    font-weight: var(--type-button-weight, 700) !important;
    line-height: var(--type-button-line-height, 1.2) !important;
}

.c-type2-action--secondary {
    flex: 1 1 0;
    border: 1px solid var(--ui-line, #ececec) !important;
    background: var(--ui-surface, #ffffff) !important;
    color: var(--ui-text, #333333) !important;
}

.c-type2-action--primary {
    flex: 1.15 1 0;
    border: 0 !important;
    background: var(--ui-brand-action, #d7181c) !important;
    color: #ffffff !important;
}

.c-type2-action--primary:hover {
    background: var(--ui-brand-action-hover, #950c0f) !important;
}

.c-type2-action--block {
    width: 100%;
    flex: 1 1 100%;
}

.c-type2-local-error {
    margin: var(--space-12, 12px) 0 0;
    padding: 9px 11px;
    border: 1px solid #fecaca;
    border-radius: var(--radius-control, 12px);
    background: #fef2f2;
    color: #991b1b;
    font-size: var(--type-helper-size, 12px);
    font-weight: var(--type-helper-weight, 500);
    line-height: var(--type-helper-line-height, 1.4);
    text-align: left;
}

/* Single meet details — pure Type 2 identity, no operation layer. */
#bottom_sheet_meet_detail .p-modal-meet-detail,
#bottom_sheet_application_details .p-modal-meet-detail {
    position: relative;
    padding: 50px 20px 22px;
    text-align: center;
}

#bottom_sheet_meet_detail .p-modal-meet-detail__loading,
#bottom_sheet_meet_detail .p-modal-meet-detail__error {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    text-align: center;
}

#bottom_sheet_meet_detail .p-modal-meet-detail__error h2 {
    margin: 0;
    font-size: var(--type-section-title-size, 16px);
    font-weight: var(--type-section-title-weight, 700);
    line-height: var(--type-section-title-line-height, 1.35);
}

#bottom_sheet_meet_detail .p-modal-meet-detail__error p,
#bottom_sheet_meet_detail .p-modal-meet-detail__loading p {
    margin: 7px 0 0;
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-helper-size, 12px);
    font-weight: var(--type-helper-weight, 500);
    line-height: var(--type-helper-line-height, 1.4);
}

#bottom_sheet_meet_detail .p-modal-meet-detail__close,
#bottom_sheet_application_details .p-modal-meet-detail__close {
    position: absolute !important;
    top: 2px !important;
    right: 0 !important;
    z-index: 4;
}

#bottom_sheet_meet_detail [data-meet-detail-title] {
    margin: 0;
    color: var(--ui-text, #333333);
    font-size: var(--type-activity-title-size, 13px);
    font-weight: var(--type-activity-title-weight, 700);
    line-height: var(--type-activity-title-line-height, 1.2);
}

#bottom_sheet_meet_detail [data-type2-meet-identity-meta] {
    margin-top: 5px;
}

#bottom_sheet_meet_detail .p-modal-meet-detail__subtitle {
    margin: 7px 0 0;
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-helper-size, 12px);
    font-weight: var(--type-helper-weight, 500);
    line-height: var(--type-helper-line-height, 1.4);
}

#bottom_sheet_meet_detail .p-modal-meet-detail__status-row,
#bottom_sheet_application_details .p-modal-meet-detail__status-row {
    min-height: 20px;
    margin-top: var(--space-12, 12px);
}

.c-type2-status,
#bottom_sheet_meet_detail [data-meet-detail-status] {
    display: inline-flex !important;
    min-height: 20px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 8px !important;
    border: 0 !important;
    border-radius: var(--radius-pill, 999px) !important;
    background: var(--ui-status-quiet-bg, #f2f0ed) !important;
    color: var(--ui-status-quiet-text, #57534e) !important;
    box-shadow: none !important;
    font-size: var(--type-micro-status-size, 10px) !important;
    font-weight: var(--type-micro-status-weight, 700) !important;
    line-height: var(--type-micro-status-line-height, 1.2) !important;
}

.c-type2-status--attention {
    background: var(--ui-status-attention-bg, #fff1dc) !important;
    color: var(--ui-status-attention-text, #8a4f08) !important;
}

#bottom_sheet_meet_detail .p-modal-meet-detail__actions {
    display: flex !important;
    gap: var(--space-8, 8px) !important;
    margin-top: 20px !important;
}

#bottom_sheet_meet_detail .p-modal-meet-detail__actions [data-meet-detail-action="activity"] {
    order: -1;
    flex: 1 1 0;
}

#bottom_sheet_meet_detail .p-modal-meet-detail__actions [data-meet-detail-action]:not([data-meet-detail-action="activity"]) {
    flex: 1.15 1 0;
}

/* Report absence. */
#bottom_sheet_absence_submit .bottom-sheet-content {
    padding: 2px 20px 22px !important;
    overflow-y: auto;
}

#bottom_sheet_absence_submit_step_confirm,
#bottom_sheet_absence_submit_step_success {
    text-align: center;
}

#bottom_sheet_absence_submit_step_confirm:not(:has(#bottom_sheet_absence_submit_confirm_button.hidden)) #bottom_sheet_absence_submit_title {
    display: none !important;
}

#bottom_sheet_absence_submit_step_confirm:has(#bottom_sheet_absence_submit_confirm_button.hidden) [data-type2-report-question] {
    display: none !important;
}

#bottom_sheet_absence_submit_date {
    display: none !important;
}

#bottom_sheet_absence_submit_confirm_button {
    margin-top: var(--space-16, 16px);
}

#bottom_sheet_absence_submit_error.hidden {
    display: none !important;
}

#bottom_sheet_absence_submit_success_icon {
    width: 48px !important;
    height: 48px !important;
    margin: 2px auto var(--space-12, 12px) !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--ui-selected-soft, #eaf6f2) !important;
    color: var(--ui-selected-dark, #1f765e) !important;
    box-shadow: none !important;
}

#bottom_sheet_absence_submit_success_icon i {
    font-size: 20px !important;
}

#bottom_sheet_absence_submit_success_title {
    margin: 0;
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-section-title-size, 16px) !important;
    font-weight: var(--type-section-title-weight, 700) !important;
    line-height: var(--type-section-title-line-height, 1.35) !important;
}

#bottom_sheet_absence_submit_success_text {
    margin: 7px 0 0 !important;
    color: var(--ui-text-secondary, #636363) !important;
    font-size: var(--type-helper-size, 12px) !important;
    font-weight: var(--type-helper-weight, 500) !important;
    line-height: var(--type-helper-line-height, 1.4) !important;
}

/* Undo absence report. */
#bottom_sheet_absence_cancel .bottom-sheet-content {
    padding: 0 !important;
    overflow-y: auto;
}

#bottom_sheet_absence_cancel .c-type2-cancel-content {
    position: relative;
    padding: 52px 20px 22px;
    text-align: center;
}

#bottom_sheet_absence_cancel .c-type2-inline-close {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 4;
}

#bottom_sheet_absence_cancel_icon,
#bottom_sheet_absence_cancel_date {
    display: none !important;
}

#bottom_sheet_absence_cancel_title {
    margin: 0;
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-section-title-size, 16px) !important;
    font-weight: var(--type-section-title-weight, 700) !important;
    line-height: var(--type-section-title-line-height, 1.35) !important;
}

#bottom_sheet_absence_cancel_message {
    margin: var(--space-16, 16px) 0 0 !important;
    padding: 11px var(--space-12, 12px);
    border-radius: var(--radius-control, 12px);
    background: var(--ui-page-bg, #f6f6f6);
    color: var(--ui-text-secondary, #636363) !important;
    font-size: var(--type-helper-size, 12px) !important;
    font-weight: var(--type-helper-weight, 500) !important;
    line-height: var(--type-helper-line-height, 1.4) !important;
    text-align: left;
    white-space: pre-line;
}

#bottom_sheet_absence_cancel .c-type2-actions:has(#bottom_sheet_absence_cancel_confirm.hidden) #bottom_sheet_absence_cancel_close {
    flex: 1 1 100%;
    border: 0 !important;
    background: var(--ui-brand-action, #d7181c) !important;
    color: #ffffff !important;
}

/* Rating: centered context, full-width functional controls. */
#bottom_sheet_meet_rating .bottom-sheet-content {
    padding: 0 20px 22px !important;
}

#bottom_sheet_meet_rating_header_title {
    display: none !important;
}

#bottom_sheet_meet_rating_initial {
    display: block !important;
    text-align: center;
}

#bottom_sheet_meet_rating_title_initial {
    margin: var(--space-16, 16px) 0 0 !important;
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-activity-title-size, 13px) !important;
    font-weight: var(--type-activity-title-weight, 700) !important;
    line-height: var(--type-activity-title-line-height, 1.2) !important;
}

#bottom_sheet_meet_rating_identity_meta {
    margin-top: 5px;
}

#bottom_sheet_meet_rating_context {
    display: none !important;
}

#bottom_sheet_meet_rating_stars {
    margin-top: 20px !important;
    gap: 10px !important;
}

#bottom_sheet_meet_rating_stars i {
    color: #d7d7d7 !important;
    font-size: 32px !important;
    line-height: 1 !important;
}

#bottom_sheet_meet_rating_stars i.active {
    color: #f59e0b !important;
}

#bottom_sheet_meet_rating_text,
#bottom_sheet_meet_rating_text_header {
    margin-top: var(--space-8, 8px) !important;
    height: auto !important;
    color: var(--ui-text-secondary, #636363) !important;
    font-size: var(--type-helper-size, 12px) !important;
    font-weight: var(--type-helper-weight, 500) !important;
    line-height: var(--type-helper-line-height, 1.4) !important;
}

#bottom_sheet_meet_rating_details.visible {
    display: block !important;
    padding-top: var(--space-16, 16px);
}

#bottom_sheet_meet_rating_details:not(.visible) {
    display: none !important;
}

#bottom_sheet_meet_rating .c-type2-rating-divider {
    height: 1px;
    margin: 0 0 20px;
    background: var(--ui-line, #ececec);
}

#bottom_sheet_meet_rating .c-type2-slider-row {
    margin-bottom: 20px;
}

#bottom_sheet_meet_rating .c-type2-slider-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8, 8px);
    margin-bottom: 6px;
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-micro-status-size, 10px);
    font-weight: 700;
    line-height: var(--type-micro-status-line-height, 1.2);
}

#bottom_sheet_meet_rating .c-type2-slider-head [id$="_label"] {
    color: var(--ui-text, #333333) !important;
}

#bottom_sheet_meet_rating .c-type2-slider-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: #707070;
    font-size: var(--type-micro-supporting-size, 10px);
    font-weight: var(--type-micro-supporting-weight, 500);
    line-height: var(--type-micro-supporting-line-height, 1.25);
}

#bottom_sheet_meet_rating .bottom-sheet-meet-rating-slider::-webkit-slider-runnable-track {
    height: 4px !important;
    border-radius: var(--radius-pill, 999px) !important;
    background: var(--ui-line, #ececec) !important;
}

#bottom_sheet_meet_rating .bottom-sheet-meet-rating-slider::-webkit-slider-thumb,
#bottom_sheet_meet_rating .bottom-sheet-meet-rating-slider.perfect::-webkit-slider-thumb,
#bottom_sheet_meet_rating .bottom-sheet-meet-rating-slider.warning::-webkit-slider-thumb,
#bottom_sheet_meet_rating .bottom-sheet-meet-rating-slider.danger::-webkit-slider-thumb {
    width: 18px !important;
    height: 18px !important;
    margin-top: -7px !important;
    border: 2px solid var(--ui-selected, #258568) !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}

#bottom_sheet_meet_rating_tags_header {
    display: none !important;
}

#bottom_sheet_meet_rating .bottom-sheet-meet-rating-tag-btn {
    padding: 6px 9px !important;
    border: 0 !important;
    border-radius: var(--radius-pill, 999px) !important;
    background: var(--ui-page-bg, #f6f6f6) !important;
    color: var(--ui-status-quiet-text, #57534e) !important;
    box-shadow: none !important;
    font-size: var(--type-micro-supporting-size, 10px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

#bottom_sheet_meet_rating .bottom-sheet-meet-rating-tag-btn.selected {
    background: var(--ui-selected-soft, #eaf6f2) !important;
    color: var(--ui-selected-dark, #1f765e) !important;
}

#bottom_sheet_meet_rating .c-type2-note-toggle {
    width: 100%;
    min-height: 40px;
    margin-top: var(--space-12, 12px);
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--ui-text-secondary, #636363);
    font-size: var(--type-filter-size, 12px);
    font-weight: var(--type-filter-weight, 600);
    line-height: var(--type-filter-line-height, 1.2);
    text-align: center;
}

#bottom_sheet_meet_rating .c-type2-note-toggle svg {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    transition: transform 160ms var(--motion-ease, cubic-bezier(.2,.8,.2,1));
}

#bottom_sheet_meet_rating_note_input {
    min-height: 92px !important;
    height: 92px !important;
    padding: 11px 13px !important;
    border: 1px solid var(--ui-line, #ececec) !important;
    border-radius: var(--radius-control, 12px) !important;
    background: #ffffff !important;
    color: var(--ui-text, #333333) !important;
    box-shadow: none !important;
    font-family: var(--font-family-ui) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
}

#bottom_sheet_meet_rating_note_input:focus {
    border-color: #707070 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(51,51,51,.08) !important;
}

#bottom_sheet_meet_rating .meet-rating-save-inline {
    margin-top: var(--space-16, 16px);
    padding-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    #bottom_sheet_meet_rating .c-type2-note-toggle svg {
        transition: none;
    }
}

/* Respect the runtime state even when this Type 2 stylesheet loads before modal-resource.css. */
#bottom_sheet_meet_detail [data-meet-detail-loading][hidden],
#bottom_sheet_meet_detail [data-meet-detail-error][hidden] {
    display: none !important;
}
