/* CF7 Advanced Upload - Frontend Styles */
.cf7-advanced-upload-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 15px 0;
    position: relative;
}

/* Upload Area Styling */
.cf7-advanced-upload-area {
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #ffffff;
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cf7-advanced-upload-area:hover,
.cf7-advanced-upload-area.cf7-drag-over {
    border-color: var(--cf7-primary-color, #4CAF50);
    background: #f0f9f0;
    transform: translateY(-2px);
}

.cf7-advanced-upload-area.cf7-drag-over {
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.cf7-advanced-upload-area.wpcf7-not-valid {
    border-color: #dc3545;
    background: #ffebee;
}

/* Upload Icon */
.cf7-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #666;
    transition: all 0.3s ease;
}

.cf7-advanced-upload-area:hover .cf7-upload-icon,
.cf7-advanced-upload-area.cf7-drag-over .cf7-upload-icon {
    color: var(--cf7-primary-color, #4CAF50);
    transform: scale(1.1);
}

/* Upload Text */
.cf7-upload-title {
    font-size: 20px;
    font-weight: 400;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cf7-upload-subtitle {
    font-size: 14px;
    color: #999;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Browse Button */
.cf7-browse-btn {
    background: var(--cf7-primary-color, #4CAF50);
    color: white;
    border: none;
    border-radius: var(--cf7-border-radius, 8px);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.cf7-browse-btn:hover {
    background: var(--cf7-primary-color-dark, #45a049);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cf7-browse-btn:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* File List */
.cf7-file-list {
    margin-top: 20px;
}

.cf7-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f8f8;
    border-radius: var(--cf7-border-radius, 8px);
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    animation: cf7-slideInUp 0.3s ease-out;
}

.cf7-file-item:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cf7-file-item.cf7-file-error {
    background: #ffebee;
    border-color: #ffcdd2;
}

.cf7-file-item.cf7-file-success {
    background: #e8f5e8;
    border-color: #c8e6c9;
}

/* File Info */
.cf7-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cf7-file-icon {
    width: 40px;
    height: 48px;
    background: #dc3545;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    flex-shrink: 0;
}

/* File type colors */
.cf7-file-icon.pdf { background: #dc3545; }
.cf7-file-icon.jpg, .cf7-file-icon.jpeg, .cf7-file-icon.png, .cf7-file-icon.gif { background: #28a745; }
.cf7-file-icon.doc, .cf7-file-icon.docx { background: #007bff; }
.cf7-file-icon.mp4, .cf7-file-icon.avi, .cf7-file-icon.mov { background: #6f42c1; }
.cf7-file-icon.zip, .cf7-file-icon.rar { background: #fd7e14; }
.cf7-file-icon.cf7-error { background: #dc3545; }

.cf7-file-details {
    flex: 1;
    min-width: 0;
}

.cf7-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf7-file-size {
    font-size: 12px;
    color: #999;
}

.cf7-error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 2px;
}

/* File Status */
.cf7-file-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Loading Spinner */
.cf7-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--cf7-primary-color, #4CAF50);
    border-radius: 50%;
    animation: cf7-spin 1s linear infinite;
}

@keyframes cf7-spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Progress Bar */
.cf7-progress-bar {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.cf7-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cf7-primary-color, #4CAF50) 0%, #66bb6a 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: cf7-progress-pulse 2s ease-in-out infinite;
}

@keyframes cf7-progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Remove Button - Modern Style */
.cf7-remove-btn {
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    border-radius: 8px !important;
    background: rgba(220, 53, 69, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: rgba(220, 53, 69, 0.7) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

.cf7-remove-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cf7-remove-btn:hover {
    background: rgba(220, 53, 69, 0.12) !important;
    color: #dc3545 !important;
    transform: translateY(-1px) scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2) !important;
    border: none !important;
}

.cf7-remove-btn:hover::before {
    opacity: 1;
}

.cf7-remove-btn:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.15) !important;
    border: none !important;
}

.cf7-remove-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
    border: none !important;
}

/* Success/Error Icons */
.cf7-success-icon {
    color: var(--cf7-primary-color, #4CAF50);
    font-size: 16px;
}

.cf7-error-icon {
    color: #dc3545;
    font-size: 16px;
}

/* Animations */
@keyframes cf7-slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Drag Over Animation */
.cf7-advanced-upload-area.cf7-drag-over {
    animation: cf7-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes cf7-pulse {
    from {
        box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
    }
    to {
        box-shadow: 0 8px 35px rgba(76, 175, 80, 0.3);
    }
}

/* Validation Error Styles */
.wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 12px;
    margin-top: 8px;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cf7-advanced-upload-area {
        padding: 30px 15px;
        min-height: 140px;
    }
    
    .cf7-upload-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .cf7-upload-title {
        font-size: 18px;
    }
    
    .cf7-upload-subtitle {
        font-size: 13px;
    }
    
    .cf7-browse-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .cf7-file-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cf7-file-info {
        width: 100%;
    }
    
    .cf7-file-status {
        margin-right: 0;
        align-self: flex-end;
    }
    
    .cf7-remove-btn {
        align-self: flex-end;
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .cf7-advanced-upload-area {
        padding: 25px 10px;
        min-height: 120px;
    }
    
    .cf7-upload-title {
        font-size: 16px;
    }
    
    .cf7-file-name {
        font-size: 13px;
    }
}