/**
 * Shared Form Styles
 * 
 * Extracted from medycyna_sanitarne_register_form block for reuse
 * Used by: Registration Block, Renewal Form
 * 
 * Includes:
 * - File upload zone with drag & drop
 * - Checkbox button styles
 * - Summary list styles
 */

/* ============================================
   FILE UPLOAD STYLES
   ============================================ */

.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;
}

/* ============================================
   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: 100%;
}

.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;
}

/* ============================================
   SUMMARY LIST STYLES
   ============================================ */

.summary-step ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.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;
}

.summary-step li span {
    color: #666;
    min-width: 300px;
}

.summary-step li strong {
    font-weight: 600;
    color: #000;
}

.summary-step h4 {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1.1em;
    color: #19b2ad;
}

/* ============================================
   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;
    }
    
    .file-preview-item,
    .add-another-file {
        flex: 0 0 calc(50% - 4px);
        width: calc(50% - 4px);
        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;
    }
    
    .checkbox-button-label {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .checkbox-button-label::after {
        left: 26px;
    }
}

/* Tablet / Desktop enhancements */
@media (min-width: 576px) {
    .summary-step li {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
}

/* ============================================
   FILE VALIDATION ERRORS
   ============================================ */

.file-validation-errors {
    margin-top: 15px;
}

.file-validation-error {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-validation-error:last-child {
    margin-bottom: 0;
}

.file-validation-error .warning-icon {
    margin-right: 10px;
    margin-top: 1px;
    color: #f39c12;
    font-size: 16px;
    flex-shrink: 0;
}

.file-validation-error span {
    flex: 1;
    word-break: break-word;
}

.file-validation-error .error-dismiss {
    margin-left: 12px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #856404;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.file-validation-error .error-dismiss:hover {
    color: #333;
    background-color: rgba(133, 100, 4, 0.15);
    transform: scale(1.1);
}

.file-validation-error .error-dismiss:active {
    transform: scale(0.95);
}

/* Mobile responsive styles for validation errors */
@media (max-width: 768px) {
    .file-validation-error {
        padding: 10px 12px;
        margin-bottom: 10px;
        font-size: 13px;
    }

    .file-validation-error .warning-icon {
        margin-right: 8px;
        font-size: 14px;
    }

    .file-validation-error .error-dismiss {
        margin-left: 8px;
        width: 20px;
        height: 20px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .file-validation-error {
        padding: 8px 10px;
        margin-bottom: 8px;
        font-size: 12px;
        border-left-width: 3px;
    }

    .file-validation-error .warning-icon {
        margin-right: 6px;
        font-size: 13px;
    }

    .file-validation-error .error-dismiss {
        width: 18px;
        height: 18px;
        font-size: 16px;
        margin-left: 6px;
    }
}

