/**
 * Style dla modala regulaminu
 * Responsywny design: Mobile-first + Desktop
 */

/* Overlay modala */
#regulaminModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: background-color 0.3s ease;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}

#regulaminModal.active {
    background-color: rgba(0, 0, 0, 0.75);
}

/* Container modala */
.regulamin-modal-content {
    background: white;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

#regulaminModal.active .regulamin-modal-content {
    transform: translateY(0);
}

/* Header modala - mobilny */
.regulamin-modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #0c4a6e 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.regulamin-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.regulamin-modal-header h2 i {
    font-size: 22px;
}

.regulamin-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.regulamin-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.regulamin-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* Body modala */
.regulamin-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    background: #f8fafc;
}

/* Content regulaminu */
.regulamin-content-wrapper {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Sekcje */
.regulamin-section {
    margin-bottom: 32px;
}

.regulamin-section:last-child {
    margin-bottom: 0;
}

.regulamin-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.regulamin-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.regulamin-section ol {
    list-style: decimal;
    padding-left: 24px;
    margin: 0;
}

.regulamin-section ol li {
    margin-bottom: 12px;
    color: #475569;
    line-height: 1.6;
}

.regulamin-section ul {
    list-style: disc;
    padding-left: 24px;
    margin-top: 8px;
}

.regulamin-section ul li {
    margin-bottom: 6px;
    color: #64748b;
}

/* Info box */
.regulamin-info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.regulamin-info-box p {
    margin: 0;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.6;
}

.regulamin-info-box i {
    margin-right: 8px;
}

/* Operator płatności */
.regulamin-payment-operator {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.regulamin-payment-operator p:first-child {
    font-weight: 700;
    color: #065f46;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.regulamin-payment-operator p:last-child {
    font-size: 13px;
    color: #047857;
    margin: 0;
}

/* Dane kontaktowe */
.regulamin-contact-box {
    background: linear-gradient(135deg, #1e293b 0%, #0c4a6e 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 32px;
}

.regulamin-contact-box h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.regulamin-contact-box p {
    margin: 8px 0;
    font-size: 14px;
    color: #e0f2fe;
}

.regulamin-contact-box strong {
    color: white;
    margin-right: 4px;
}

/* Desktop styles */
@media (min-width: 768px) {
    #regulaminModal {
        padding: 40px 20px;
        align-items: center;
    }
    
    .regulamin-modal-content {
        max-width: 900px;
        max-height: 90vh;
        height: auto;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        transform: scale(0.9);
        opacity: 0;
    }
    
    #regulaminModal.active .regulamin-modal-content {
        transform: scale(1);
        opacity: 1;
    }
    
    .regulamin-modal-header {
        border-radius: 16px 16px 0 0;
        padding: 24px 32px;
    }
    
    .regulamin-modal-header h2 {
        font-size: 24px;
    }
    
    .regulamin-modal-body {
        padding: 32px;
    }
    
    .regulamin-content-wrapper {
        padding: 32px;
    }
    
    .regulamin-section h3 {
        font-size: 22px;
    }
    
    .regulamin-close-btn {
        width: 44px;
        height: 44px;
    }
}

/* Bardzo małe ekrany */
@media (max-width: 360px) {
    .regulamin-modal-header h2 {
        font-size: 16px;
    }
    
    .regulamin-modal-body {
        padding: 16px;
    }
    
    .regulamin-content-wrapper {
        padding: 16px;
    }
}

/* Smooth scroll dla iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .regulamin-modal-body {
        -webkit-overflow-scrolling: touch;
    }
}

