/*
 * File: style.css
 * Path: \themes\kadence-child-theme-master\tools\image-compressor\style.css
 */

#image-compressor-tool {
    max-width: 900px;
    width: 95%;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: "Segoe UI", sans-serif;
    text-align: center; /* Center main content */
}

#image-compressor-tool h3 {
    text-align: left; /* Align heading left as per your preference */
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: #333;
}

.upload-section {
    border: 2px dashed #FF8A08;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.upload-section:hover {
    border-color: #e67e22;
}

.upload-section input[type="file"] {
    display: none; /* Hide the default file input */
}

.upload-section label {
    font-size: 1.2rem;
    color: #555;
    margin-top: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-section label span {
    font-weight: bold;
    color: #FF8A08;
    margin-top: 5px;
    text-decoration: underline;
}

.upload-section .icon {
    font-size: 3rem;
    color: #FF8A08;
    margin-bottom: 10px;
}

.compression-options {
    margin-bottom: 2rem;
    text-align: left; /* Align controls left */
}

.compression-options h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.quality-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start; /* Align buttons left */
}

.quality-buttons button {
    background-color: #FF8A08;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    min-width: 80px; /* Ensure a minimum width */
}

.quality-buttons button:hover {
    background-color: #e67e22;
    transform: translateY(-1px);
}

.quality-buttons button.active {
    background-color: #28a745; /* Green for active */
    box-shadow: 0 0 0 2px #28a745, 0 0 0 4px rgba(40, 167, 69, 0.5); /* Highlight active button */
}


.output-section {
    margin-top: 2rem;
    text-align: left; /* Align output info left */
}

.output-section h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.output-info p {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.95rem;
}

.output-info strong {
    color: #333;
}

.download-link {
    display: inline-block;
    background-color: #0073aa; /* WordPress blue */
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    transition: background-color 0.2s ease;
}

.download-link:hover {
    background-color: #005f8d;
}

canvas {
    display: none; /* Hidden by default, used for drawing/compressing */
}

#preview-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: none; /* Initially hidden */
}

#loading-indicator {
    display: none; /* Hidden by default */
    margin-top: 1.5rem;
    color: #FF8A08;
    font-weight: bold;
}

.error-message {
    color: #dc3545; /* Red for errors */
    margin-top: 1rem;
    font-weight: bold;
    display: none; /* Hidden by default */
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .upload-section {
        padding: 1.5rem;
    }
    .quality-buttons {
        flex-direction: column; /* Stack buttons on small screens */
    }
    .quality-buttons button {
        width: 100%;
    }
}