/* ========================================
   RULES WARNING MODAL
   Detail varování pravidel chovu pro plán vrhu
   ======================================== */

.rules-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.rules-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.rules-modal__dialog {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.rules-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.rules-modal__header-text {
    flex: 1;
    min-width: 0;
}

.rules-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.rules-modal__subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: #64748b;
}

.rules-modal__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: background 0.15s ease, color 0.15s ease;
}

.rules-modal__close svg { width: 18px; height: 18px; }

.rules-modal__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.rules-modal__body {
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Skupina varování pro konkrétní "stranu" (fena / pes / pár) */
.rules-modal__group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.rules-modal__group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rules-modal__group-icon {
    width: 18px;
    height: 18px;
    color: #475569;
    flex-shrink: 0;
}

.rules-modal__group-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.rules-modal__group-sub {
    font-size: 12px;
    color: #64748b;
    margin-left: auto;
    white-space: nowrap;
}

/* Jednotlivá položka varování */
.rules-modal__item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-top: 1px dashed #e2e8f0;
}

.rules-modal__item:first-of-type { border-top: none; padding-top: 0; }

.rules-modal__item-badge {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.rules-modal__item-badge svg {
    width: 10px;
    height: 10px;
}

.rules-modal__item-badge--hard { background: #dc2626; }
.rules-modal__item-badge--soft { background: #ca8a04; }

.rules-modal__item-body {
    flex: 1;
    min-width: 0;
}

.rules-modal__item-rule {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px;
}

.rules-modal__item-detail {
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
    margin: 0;
}

.rules-modal__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.rules-modal__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #64748b;
    margin: 0;
}

.rules-modal__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rules-modal__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.rules-modal__dot--hard { background: #dc2626; }
.rules-modal__dot--soft { background: #ca8a04; }

.rules-modal__btn {
    align-self: flex-end;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.rules-modal__btn--primary {
    background: #0f172a;
    color: #ffffff;
}

.rules-modal__btn--primary:hover {
    background: #1e293b;
}

@media (min-width: 640px) {
    .rules-modal__footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .rules-modal__btn { align-self: auto; }
}
