/* WebP Converter Plugin Styles */
#pbpg-container {
    max-width: 1024px;
    margin: 20px 0;
}

.pbpg-version-info {
    font-size: 50%;
    font-variant-position:super;
    color:#666;
}

/* File Upload Styling */
#pbpg-image-upload {
    display: inline;
    width: 100%;
    padding: 0px;
    border: none;
    cursor: pointer;
}

#pbpg-image-upload:disabled {
    cursor: not-allowed;
}

/* Progress Bar */
.pbpg-progress-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: #f0f0f0;
    border-radius: 12px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid #ddd;
}

.pbpg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--e-global-color-primary), var(--e-global-color-accent));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 12px;
}

div.pbpg-upload-controls, 
div.pbpg-form-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0.2em;
    margin-top:0.2em;
}

input.pbp-input {
  display:inline;
  font-family: monospace;
  border: 2px inset gray;
  border-radius: 4px;
  padding: 2px;
  background: #fedd0340;
  margin:0.2em;
}
button.pbp-input {
    display: inline;
    margin:0.2em;
}

input[type="file"]:disabled::file-selector-button, input.pbp-input:disabled, button.pbp-input:disabled, select.pbp-input:disabled, 
input[type="file"]:disabled::file-selector-button:hover, button.pbp-input:disabled:hover, button.pbp-input:disabled:hover, select.pbp-input:disabled:hover {
    background-color:#ddd !important;
    color:#666 !important;
    cursor: no-drop;
}

button.pbp-input, input[type="file"]::file-selector-button{
    background-color: var(--e-global-color-primary);
}

button.pbp-input:hover, input[type="file"]::file-selector-button:hover {
    background-color: var(--e-global-color-secondary);
}

input[type="file"]::-webkit-file-upload-button {
    margin-right: 10px; /* Safari/alte Chrome */
    appearance: button;
    border-radius: 5px;
    border-style: none;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 4px 0px;
    color: rgb(51, 51, 51);
    padding:5px;
    margin: 0px;
    text-shadow: rgba(0, 0, 0, 0.3) 6px 6px 10px;
}
  
input[type="file"]::file-selector-button {
    margin-right: 10px; /* Moderne Browser */
    appearance: button;
    border-radius: 5px;
    border-style: none;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 4px 0px;
    color: rgb(51, 51, 51);
    padding:5px;
    margin: 0px;
    text-shadow: rgba(0, 0, 0, 0.3) 6px 6px 10px;
}
select.pbp-input:enabled {
    background: #fedd0340;
}

select.pbp-input {
    display: inline;
    margin:0.2em;
}

.pbpg-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #333;
    z-index: 1;
}

/* Image Preview */
.pbpg-image-preview {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#pbpg-preview-image {
    max-width: 200%;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.image-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Results */
#pbpg-upload-result,
#pbpg-conversion-result {
    margin-top: 15px;
}

#pbpg-upload-result p,
#pbpg-conversion-result p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    #pbpg-pbpg-container {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .pbpg-upload-section,
    #pbpg-conversion-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    #pbpg-preview-image {
        max-height: 200px;
    }

}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error and Success States */
.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

/* Security Banner */
.pbpg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pbpg-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pbpg-modal-header {
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.pbpg-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.pbpg-modal-body {
    padding: 20px;
}

.pbpg-security-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.pbpg-security-notice h4 {
    color: #856404;
    margin-top: 0;
}

.pbpg-security-notice ul {
    margin: 10px 0;
    padding-left: 20px;
}

.pbpg-security-notice li {
    margin: 8px 0;
    line-height: 1.4;
}

.pbpg-agreement-checkbox {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.pbpg-agreement-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.pbpg-agreement-checkbox input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    transform: scale(1.2);
}

.pbpg-captcha-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.pbpg-modal-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.pbpg-modal-footer button {
    margin-left: 10px;
}