/* WP Forms Google Drive Upload Styles */

.wpforms-gdrive-upload-container {
    margin: 20px 0;
}

.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.3s ease;
    background: #fafafa;
    position: relative;
}

.file-upload-area:hover {
    border-color: #999;
    background: #f0f0f0;
}

.file-upload-area.drag-over {
    border-color: #007cba;
    background: #e6f3ff;
}

.file-upload-area input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-upload-label {
    cursor: pointer;
    display: block;
    color: #666;
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.upload-info {
    font-size: 12px;
    color: #888;
    display: block;
}

.uploaded-files-list {
    margin-top: 20px;
}

.upload-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
}

.upload-item.upload-complete {
    border-color: #28a745;
    background: #f8fff9;
}

.upload-item.upload-error {
    border-color: #dc3545;
    background: #fff8f8;
}

.file-name {
    font-weight: 600;
    margin-bottom: 8px;
    word-break: break-all;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007cba;
    transition: width 0.3s ease;
}

.upload-complete .progress-fill {
    background: #28a745;
}

.upload-error .progress-fill {
    background: #dc3545;
}

.progress-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    min-width: 80px;
}

.upload-complete .progress-text {
    color: #28a745;
}

.upload-error .progress-text {
    color: #dc3545;
}

.view-file-link {
    display: inline-block;
    margin-top: 8px;
    color: #007cba;
    text-decoration: none;
    font-size: 12px;
}

.view-file-link:hover {
    text-decoration: underline;
}

.remove-file {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: #c82333;
}

.upload-error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 14px;
    }
    
    .upload-info {
        font-size: 11px;
    }
    
    .upload-progress {
        flex-direction: column;
        gap: 5px;
    }
    
    .progress-text {
        min-width: auto;
        text-align: center;
    }
}

/* Form integration styles */
.wpforms-container .wpforms-gdrive-upload-container {
    margin: 15px 0;
}

.wpforms-field .wpforms-gdrive-upload-container {
    margin-top: 5px;
}

/* Admin settings page styles */
.wpforms-gdrive-settings .form-table th {
    width: 200px;
}

.wpforms-gdrive-settings .regular-text {
    width: 400px;
}