/*
Patrz application/themes/theme/resources/
*/

.visitDatetime option[disabled] {
    display: none;
}

.booking-timer-sticky {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    max-width: 300px;
    font-family: inherit;
}

.booking-timer-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.booking-timer-success {
    background: rgba(40, 167, 69, 0.95);
    border-color: rgba(40, 167, 69, 0.8);
    color: white;
}

.booking-timer-warning {
    background: rgba(255, 193, 7, 0.95);
    border-color: rgba(255, 193, 7, 0.8);
    color: #212529;
}

.booking-timer-icon { 
    margin-right: 12px;
    font-size: 20px;
    flex-shrink: 0;
}

.booking-timer-text {
    flex: 1;
    min-width: 0;
}

.booking-timer-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.booking-timer-countdown {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    margin-bottom: 2px;
}

.booking-timer-extend {
    margin-top: 8px;
}

.booking-timer-extend-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-timer-extend-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.booking-timer-warning .booking-timer-extend-btn {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.booking-timer-warning .booking-timer-extend-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.3);
}

.booking-timer-subtitle {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.2;
}

.booking-timer-close {
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.7;
    font-size: 14px;
    padding: 4px;
    border-radius: 50%;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-timer-close:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .booking-timer-sticky {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .booking-timer-content {
        padding: 14px 18px;
    }
    
    .booking-timer-title {
        font-size: 15px;
    }
    
    .booking-timer-countdown {
        font-size: 18px;
    }
    
    .booking-timer-subtitle {
        font-size: 13px;
    }
}

/* Animation for urgency when time is low */
.booking-timer-warning .booking-timer-countdown {
    animation: booking-timer-pulse 1s ease-in-out infinite alternate;
}

@keyframes booking-timer-pulse {
    from { opacity: 1; }
    to { opacity: 0.7; }
}

/* Booking Expiration Message Styles */
.booking-expiration-alert {
    position: relative;
    padding: 20px 50px 20px 20px;
    margin-bottom: 20px;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    background-color: #fff3cd;
    color: #856404;
    animation: booking-expiration-slide-in 0.5s ease-out;
    line-height: 1.5;
}

.booking-expiration-alert .d-flex {
    display: flex;
}

.booking-expiration-alert .align-items-start {
    align-items: flex-start;
}

.booking-expiration-alert .mr-2 {
    margin-right: 0.5rem;
}

.booking-expiration-alert .mt-1 {
    margin-top: 0.25rem;
}

.booking-expiration-alert .text-warning {
    color: #f39c12 !important;
}

.booking-expiration-alert strong {
    font-weight: 600;
}

.booking-expiration-alert .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #856404;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.booking-expiration-alert .btn-close:hover {
    opacity: 1;
}

@keyframes booking-expiration-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness for expiration alert */
@media (max-width: 768px) {
    .booking-expiration-alert {
        padding: 15px 40px 15px 15px;
    }
    
    .booking-expiration-alert .mr-2 {
        margin-right: 0.4rem;
    }
    
    .booking-expiration-alert .btn-close {
        top: 10px;
        right: 10px;
        width: 22px;
        height: 22px;
        font-size: 18px;
    }
}

.validation-alert {
    background: linear-gradient(135deg, #fff3cd 0%, #fefcf3 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.validation-alert-header {
    display: flex;
    align-items: flex-start;
}

.validation-alert-icon {
    font-size: 32px;
    color: #f0ad4e;
    margin-right: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.validation-alert-content {
    flex: 1;
}

.validation-alert-title {
    font-size: 18px;
    font-weight: 700;
    color: #856404;
    line-height: 1.3;
}

.validation-alert-text {
    font-size: 15px;
    color: #856404;
    line-height: 1.4;
}

.validation-requirements {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.validation-requirements li {
    position: relative;
    padding: 8px 0 8px 28px;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(133, 100, 4, 0.1);
}

.validation-requirements li:last-child {
    border-bottom: none;
}

.validation-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    width: 20px;
    height: 20px;
    background: #f0ad4e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.validation-checkbox-container {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(133, 100, 4, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.validation-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.validation-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #f0ad4e;
}

.validation-checkbox-label {
    font-size: 14px;
    font-weight: 600;
    color: #856404;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .validation-alert {
        padding: 16px;
        margin-top: 16px;
    }
    
    .validation-alert-header {
        margin-bottom: 12px;
    }
    
    .validation-alert-icon {
        font-size: 28px;
        margin-right: 12px;
    }
    
    .validation-alert-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .validation-alert-text {
        font-size: 14px;
        margin-bottom: 14px;
    }
    
    .validation-requirements {
        margin-bottom: 16px;
    }
    
    .validation-requirements li {
        padding: 6px 0 6px 24px;
        font-size: 13px;
    }
    
    .validation-requirements li::before {
        width: 16px;
        height: 16px;
        top: 6px;
        font-size: 10px;
    }
    
    .validation-checkbox-container {
        padding: 12px;
    }
    
    .validation-checkbox-wrapper {
        gap: 8px;
    }
    
    .validation-checkbox {
        width: 18px;
        height: 18px;
        margin-top: 2px;
    }
    
    .validation-checkbox-label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .validation-alert {
        padding: 12px;
    }
    
    .validation-alert-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 16px;
    }
    
    .validation-alert-icon {
        margin: 0 auto;
        font-size: 36px;
    }
    
    .validation-alert-title {
        font-size: 15px;
    }
    
    .validation-requirements li {
        padding: 8px 0 8px 28px;
    }
    
    .validation-requirements li::before {
        width: 18px;
        height: 18px;
        top: 8px;
    }
}

.file-upload-container {
    margin-top: 16px;
}

.file-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: #19b2ad;
    background: #f0fffe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 178, 173, 0.15);
}

.upload-icon {
    font-size: 48px;
    color: #19b2ad;
    margin-bottom: 16px;
    display: block;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
}

.file-upload-zone:hover .upload-icon,
.file-upload-zone.dragover .upload-icon {
    transform: scale(1.1);
    color: #16a085;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.4;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #19b2ad;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.upload-button:hover {
    background: #16a085;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 178, 173, 0.3);
    color: white;
    text-decoration: none;
}

.files-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    align-items: stretch;
}

.file-preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
    width: 180px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.file-preview-item.excess-file {
    border: 2px solid #dc3545;
    background: #fff5f5;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.file-preview-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-preview-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.file-preview-info {
    padding: 8px 12px;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.file-preview-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.file-preview-size {
    font-size: 11px;
    color: #666;
}

.file-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    z-index: 2;
    border-radius: 2px;
}

.file-remove-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.05);
}

.add-another-file {
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    width: 180px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #666;
}

.add-another-file:hover {
    border-color: #19b2ad;
    background: #f0fffe;
    color: #19b2ad;
    transform: translateY(-1px);
    text-decoration: none;
}

.add-another-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: #19b2ad;
    transition: color 0.3s ease;
}

.add-another-text {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.file-limit-warning {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #721c24;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-limit-warning .warning-icon {
    font-size: 16px;
    color: #dc3545;
}

.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #19b2ad 0%, #16a085 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.file-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}



/* Mobile optimizations */
@media (max-width: 768px) {
    .file-upload-zone {
        padding: 20px 12px;
    }
    
    .upload-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .upload-hint {
        font-size: 13px;
    }
    
    .files-container {
        gap: 8px;
        justify-content: center; /* ensure even spacing and allow two columns */
    }
    
    .file-preview-item,
    .add-another-file {
        flex: 0 0 calc(50% - 4px);
        width: calc(50% - 4px); /* two boxes per row accounting for gap */
        max-width: 180px;
        min-height: 100px;
    }
    
    .file-preview-image {
        height: 60px;
    }
    
    .upload-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .add-another-icon {
        font-size: 20px;
    }
    
    .add-another-text {
        font-size: 12px;
    }
    
    .file-limit-warning {
        padding: 10px 12px;
        font-size: 13px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    
    .file-limit-warning .warning-icon {
        font-size: 20px;
    }
}

/* Mobile-first summary styling */
#medycyna-sanitarne-register-user fieldset.summary-step ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#medycyna-sanitarne-register-user fieldset.summary-step li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95em;
}
#medycyna-sanitarne-register-user fieldset.summary-step li span {
    color: #666;
    min-width: 300px;
}
#medycyna-sanitarne-register-user fieldset.summary-step li strong {
    font-weight: 600;
    color: #000;
}
/* Tablet / Desktop enhancements */
@media (min-width: 576px) {
    #medycyna-sanitarne-register-user fieldset.summary-step li {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
}
#medycyna-sanitarne-register-user fieldset.summary-step h4 {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1.1em;
    color: #19b2ad;
}

.radio-button-group {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    justify-content: flex-start;
}

.radio-button-option {
    position: relative;
    flex: 0 0 auto;
    min-width: 120px;
}

.radio-button-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    min-height: 40px;
    position: relative;
    border-radius: 6px;
    max-width: 400px;

}

.radio-button-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.radio-button-label::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: #fff;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.radio-button-option input[type="radio"]:checked + .radio-button-label {
    background: #19b2ad;
    border-color: #19b2ad;
    color: #fff;
    font-weight: 600;
}

.radio-button-option input[type="radio"]:checked + .radio-button-label::before {
    border-color: #fff;
    background: #fff;
    box-shadow: inset 0 0 0 4px #19b2ad;
}

.radio-button-label:hover::before {
    border-color: #adb5bd;
}

.radio-button-option input[type="radio"]:focus + .radio-button-label {
    box-shadow: 0 0 0 2px rgba(25, 178, 173, 0.25);
    outline: none;
}


/* Checkbox Button Styles */
.checkbox-button-option {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-button-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-button-label {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    min-height: 40px;
    position: relative;
    border-radius: 6px;
    max-width: 350px;
}

.checkbox-button-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.checkbox-button-label::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 3px;
    background: #fff;
    transition: all 0.25s ease;
    flex-shrink: 0;
    position: relative;
}

.checkbox-button-label::after {
    content: '';
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    border-radius: 1px;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    transition: all 0.25s ease;
}

.checkbox-button-option input[type="checkbox"]:checked + .checkbox-button-label {
    background: #19b2ad;
    border-color: #19b2ad;
    color: #fff;
    font-weight: 600;
}

.checkbox-button-option input[type="checkbox"]:checked + .checkbox-button-label::before {
    border-color: #fff;
    background: #19b2ad;
}

.checkbox-button-option input[type="checkbox"]:checked + .checkbox-button-label::after {
    opacity: 1;
}

.checkbox-button-label:hover::before {
    border-color: #adb5bd;
}

.checkbox-button-option input[type="checkbox"]:focus + .checkbox-button-label {
    box-shadow: 0 0 0 2px rgba(25, 178, 173, 0.25);
    outline: none;
}

/* Desktop optimizations */
@media (min-width: 769px) {
    .radio-button-option {
        min-width: 100px;
    }
    
    .radio-button-label {
        padding: 8px 16px;
    }
    
    .checkbox-button-label {
        padding: 8px 16px;
    }
    
    .checkbox-button-label::after {
        left: 24px;
    }

    .payment-section tr td:first-of-type {
        width: 300px;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .radio-button-group {
        gap: 8px;
    }
    
    .radio-button-option {
        flex: 1;
        min-width: 0;
    }
    
    .radio-button-label {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .radio-button-label::before {
        width: 18px;
        height: 18px;
    }
}

/* Step slide transition animations - handled by JavaScript */