/**
 * Public-facing styles
 */
 
.wp-image-converter-public {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #444;
    max-width: 800px;
    margin: 30px auto;
}

.wp-image-converter-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.wp-image-converter-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    transition: all 0.3s ease;
}

.wp-image-converter-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.wp-image-converter-card h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
    font-size: 22px;
    font-weight: 600;
}

.wp-image-converter-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.wp-image-converter-form .form-group {
    margin-bottom: 20px;
}

.wp-image-converter-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.wp-image-converter-form select,
.wp-image-converter-form input[type="number"] {
    width: 100%;
    max-width: 300px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 15px;
}

#upload-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    #upload-methods {
        flex-direction: row;
    }
}

.image-selector {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.image-preview {
    width: 120px;
    height: 120px;
    background-color: #f5f5f5;
    border: 1px dashed #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
}

/* File upload styling */
.direct-upload-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.upload-button {
    display: inline-block;
    cursor: pointer;
    padding: 8px 16px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.upload-button:hover {
    background-color: #f0f0f0;
}

.upload-button:active {
    background-color: #e5e5e5;
}

.quality-slider {
    width: 100%;
    max-width: 300px;
    margin-top: 8px;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4285f4;
    cursor: pointer;
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4285f4;
    cursor: pointer;
}

.conversion-result {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.conversion-result.hidden {
    display: none;
}

.conversion-result h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.before-after {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .before-after {
        grid-template-columns: 1fr 1fr;
    }
}

.before, .after {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.before h4, .after h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 500;
}

.image-container {
    max-width: 100%;
    height: 200px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
}

/* Image error display styles */
.image-error {
    padding: 15px;
    text-align: center;
    background-color: #fdf7f7;
    border: 1px dashed #f5c6cb;
    color: #721c24;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-error p {
    margin: 0;
    font-size: 14px;
}

.image-error a {
    color: #0073aa;
    text-decoration: underline;
    margin-left: 5px;
}

.image-details {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Button styles */
.wp-image-converter-form .button {
    padding: 8px 16px;
    height: auto;
    font-size: 14px;
    line-height: 1.5;
}

.wp-image-converter-form .button-primary {
    background: #4285f4;
    border-color: #4285f4;
    color: #fff;
    transition: all 0.2s ease;
}

.wp-image-converter-form .button-primary:hover {
    background: #3367d6;
    border-color: #3367d6;
}

.spinner {
    background: url(/wp-admin/images/spinner.gif) no-repeat;
    background-size: 20px 20px;
    display: inline-block;
    visibility: hidden;
    vertical-align: middle;
    opacity: 0.7;
    width: 20px;
    height: 20px;
    margin-left: 10px;
}

.spinner.is-active {
    visibility: visible;
} 