@charset "UTF-8";

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--font-color);
    padding-top: 40px; /* Space for fixed header */
}

.main-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.resizer-container {
    background-color: var(--content-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 25px;
}

h1 {
    margin-top: 0;
    color: var(--font-color);
    text-align: center;
    margin-bottom: 10px;
}

.tool-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Image Preview Area */
.image-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.dropzone {
    width: 95%;
    height: 150px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    margin-bottom: 10px;
	background-color: var(--alt-content-bg-color);
	color: var(--alt-font-color);
}

.dropzone:hover, .dropzone.dragover {
    border-color: #4CAF50;
    background-color: #f0f9f0;
}

.dropzone p {
    margin: 0 0 15px 0;
    color: #4CAF50;
}

.file-input {
    display: none;
}

.file-input-label {
    background-color: #4CAF50;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-input-label:hover {
    background-color: #45a049;
}

.preview-box {
    width: 100%;
    max-width: 500px;
    text-align: center;
    display: none; /* Initially hidden */
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-dimensions {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Resizer Form */
.resizer-form {
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 6px;
	color: var(--font-color);
}

.resize-options {
    margin-bottom: 30px;
}

.resize-options h3 {
    margin-top: 0;
    margin-bottom: 15px;
	color: var(--font-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.option {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.option:hover {
    background-color: var(--alt-content-bg-color);
}

/* Option header styling */
.option-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
	color: var(--font-color);
}

.option-header label {
    cursor: pointer;
    font-weight: 500;
    margin-left: 0; /* Remove any left margin */
}

.option-header input[type="radio"] {
    margin-right: 10px;
}

/* Update the existing option label styling to be more specific */
.option-header label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* Enhance the radio buttons */
.option-header input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    outline: none;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
}

.option-header input[type="radio"]:checked {
    border-color: #4CAF50;
}

.option-header input[type="radio"]:checked::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Option controls positioning */
.option-controls {
    margin-top: 10px;
    margin-left: 28px; /* Align with the text, not the radio button */
    padding-left: 5px;
    border-left: 2px solid #4CAF50;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.option-controls.active {
    border-left-color: #4CAF50;
    opacity: 1;
}

.option-controls.inactive {
    border-left-color: #ccc;
    opacity: 0.6;
    pointer-events: none;
}

.inactive input, 
.inactive button {
    cursor: not-allowed;
}

.option label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.option input[type="radio"] {
    margin-right: 8px;
}

/* Percentage Controls */
.percentage-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.slider {
    flex: 1;
    min-width: 150px;
    margin-right: 15px;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.number-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.percentage-symbol {
    margin-left: 5px;
    color: #666;
}

.resulting-dimensions {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    width: 100%;
}

/* Custom Dimensions Controls */
.dimensions-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dimension-input {
    display: flex;
    align-items: center;
}

.dimension-input label {
    margin-right: 5px;
}

.unit {
    margin-left: 5px;
    color: #666;
}

.maintain-aspect {
    display: flex;
    align-items: center;
    margin-top: 10px;
    width: 100%;
}

.maintain-aspect input {
    margin-right: 5px;
}

/* Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.primary-button, .secondary-button {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-button {
    background-color: #4CAF50;
    color: white;
}

.primary-button:hover {
    background-color: #45a049;
}

.primary-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.secondary-button {
    background-color: #f1f1f1;
    color: #333;
}

.secondary-button:hover {
    background-color: #e7e7e7;
}

.secondary-button:disabled {
    background-color: #f1f1f1;
    color: #999;
    cursor: not-allowed;
}

/* Style for the download icon */
.download-icon {
    display: inline-block;
    margin-right: 5px;
  font-size: 14px;
}

/* Add a reset button to allow users to select a different image */
/* Add this at the end to ensure we have a way to reset and select a new image */
.reset-container {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
    display: none; /* Initially hidden */
}

.reset-link {
    color: var(--font-color);
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s;
}

.reset-link:hover {
    color: #4CAF50;
    border-color: #4CAF50;
    background-color: var(--alt-content-bg-color);
}

.reset-link:before {
    content: "↺ ";
    display: inline-block;
    margin-right: 5px;
}

/* Visual feedback for resize action */
.resize-success-indicator {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 5px;
    font-weight: bold;
    font-size: 14px;
}

/* Success state for resize button */
.primary-button.success {
    background-color: #45a049;
    position: relative;
}

/* Highlight download button */
.secondary-button.highlight-button {
    animation: pulse 1.5s infinite;
    background-color: #f0f9f0;
    border: 1px solid #4CAF50;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Notification banner */
.resize-notification {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: opacity 0.5s;
    display: flex;
    align-items: center;
}

.resize-notification span {
    font-size: 18px;
    margin-right: 10px;
}

/* Enhance image preview when resized */
.preview-box {
    position: relative;
}

.preview-image {
    transition: opacity 0.5s ease-in-out;
    border: 2px solid transparent;
}

.preview-image.resized {
    border: 2px solid #4CAF50;
}

/* Make dimensions display more prominent */
.image-dimensions {
    font-size: 14px;
    color: var(--font-color);
    margin: 15px 0;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
}

.image-dimensions strong {
    color: var(--font-color);
}

/* Enhanced tool info banner */
.tool-info-banner {
    display: flex;
    align-items: center;
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-info-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.info-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #4CAF50;
}

.info-content {
    flex: 1;
}

.info-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #2e7d32;
}

.info-description {
    margin: 0;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.info-description strong {
    font-weight: 600;
    color: #1b5e20;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .percentage-controls, .dimensions-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .slider {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .dimension-input {
        width: 100%;
    }
}