/* multi-tool-website/assets/css/image-converter.css */

.image-converter-card {
   /* background-color: var(--tool-card-bg);
    box-shadow: var(--tool-card-shadow);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    transition: var(--transition);*/
    padding: 0px;
}

.image-converter-card .form-group {
    margin-bottom: 25px;
}


.light-mode .drop-area {
    background-color: rgba(0, 0, 0, 0.05); /* Lighter background for light mode */
    border-color: var(--primary-dark);
}

.drop-area.highlight {
    background-color: var(--primary-light);
    border-color: var(--primary-dark);
}

.drop-area-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark-text); /* Use dark-text for contrast */
}

.icon-upload {
    font-size: 3.5em;
    color: var(--primary-medium);
    margin-bottom: 15px;
}

.drop-text {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 5px;
}

.max-info {
    font-size: 0.85em;
    color: var(--dark-accent); /* Use dark-accent for informational text */
    opacity: 0.8;
}

.file-list {
    margin-top: 20px;
    border-top: 1px dashed var(--primary-medium);
    padding-top: 15px;
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--dark-bg); /* Darker background for file items */
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: var(--dark-text);
    transition: var(--transition);
}

.light-mode .file-item {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}


.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-icon {
    margin-right: 10px;
    color: var(--primary-light);
    font-size: 1.2em;
}

.file-name {
    font-weight: 500;
    flex-grow: 1;
    text-align: left;
}

.file-size {
    font-size: 0.85em;
    color: var(--dark-accent);
    margin-left: 10px;
}

.file-remove {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.2s ease;
}

.file-remove:hover {
    color: var(--primary-medium);
}

/* Updated OR Separator */
.or-separator {
    margin: 20px 0;
    position: relative;
    color: var(--dark-text);
    opacity: 0.7;
    width: 100%; /* Ensure full width */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Vertically align items */
    justify-content: center; /* Center content horizontally */
    text-align: center; /* Fallback for span text alignment */
}

.or-separator::before,
.or-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px); /* Adjusted width to account for "OR" padding */
    height: 1px;
    background-color: var(--primary-medium);
    transform: translateY(-50%); /* Fine-tune vertical alignment */
}

.or-separator::before {
    left: 0;
}

.or-separator::after {
    right: 0;
}

.or-separator span {
    padding: 0 10px; /* Padding around the "OR" text */
    background-color: var(--dark-bg); /* Match background to hide line under text */
    position: relative; /* Ensure the span is above the lines */
    z-index: 1; /* Bring "OR" text to the front */
}

.light-mode .or-separator span {
    background-color: var(--light-menu-bg); /* Match light mode background */
}


.remote-url-group {
    display: flex;
    text-align: left;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    align-items: center;
}

.remote-url-group label {
    
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-text);
    width: 30%;
}

.tool-input {
    width: 70%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: var(--contact-input-bg);
    color: var(--dark-text);
    font-size: 1em;
    transition: var(--transition);
}

.light-mode .tool-input {
    background-color: var(--contact-input-bg);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

.tool-input::placeholder {
    color: var(--dark-accent);
    opacity: 0.7;
}

.tool-input:focus {
    border-color: var(--primary-medium);
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 156, 137, 0.3);
}

.options-group {
    /*background-color: var(--tool-card-bg); /* Use the same tool card bg for options */
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    text-align: left;
   /* box-shadow: var(--tool-card-shadow);*/
}

.options-group .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.options-group label {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-text);
}

.tool-select, .tool-range-slider, .tool-input-small {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: var(--contact-input-bg);
    color: var(--dark-text);
    font-size: 1em;
    transition: var(--transition);
}

.tool-select option{
    background: var(--dark-menu-bg);
}
.light-mode .tool-select, .light-mode .tool-range-slider, .light-mode .tool-input-small {
    background-color: var(--contact-input-bg);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

.tool-select:focus, .tool-range-slider:focus, .tool-input-small:focus {
    border-color: var(--primary-medium);
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 156, 137, 0.3);
}

.tool-range-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--primary-light);
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
    border: none; /* Override default input border */
}

.tool-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-dark);
    cursor: grab;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tool-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-dark);
    cursor: grab;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tool-range-slider::-webkit-slider-thumb:active,
.tool-range-slider::-moz-range-thumb:active {
    transform: scale(1.1);
    cursor: grabbing;
}

.range-value {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
    color: var(--dark-text);
    text-align: right;
    width: 100%;
}

.resize-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.resize-inputs .tool-input-small {
    flex: 1;
    text-align: center;
}

.x-separator {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-medium);
}

.resize-hint {
    font-size: 0.85em;
    color: var(--dark-accent);
    margin-top: 10px;
    opacity: 0.8;
}

.btn-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--dark-text); /* Ensure contrast */
    background-image: var(--primary-gradient);
    border: 1px solid var(--primary-medium);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled {
    background-image: none;
    background-color: var(--primary-light);
    color: rgba(0, 0, 0, 0.5);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-medium);
    border: 1px solid var(--primary-medium);
}

.btn-secondary:hover {
    background-color: var(--primary-medium);
    color: var(--dark-text);
    transform: translateY(-2px);
}

.btn-success {
    background-image: linear-gradient(135deg, #4CAF50, #2E8B57); /* A distinct success color */
    color: white;
    border: 1px solid #2E8B57;
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* Processing and Results Sections */
#processingSection, #resultsSection {
    margin-top: 40px;
    padding: 25px;
   /* background-color: var(--tool-card-bg);*/
    border-radius: 12px;
  /* box-shadow: var(--tool-card-shadow);*/
    color: var(--dark-text);
}

#processingSection h3, #resultsSection h3 {
    color: var(--primary-light);
    margin-bottom: 20px;
    text-align: center;
}

.progress-bar-overall {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--primary-medium);
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-medium);
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease-in-out;
}

.progress-text-overall {
    text-align: center;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.conversion-status {
    display: grid;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

.conversion-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--dark-text);
}

.conversion-item-name {
    flex-grow: 1;
    font-weight: 500;
}

.conversion-item-progress {
    width: 100px;
    margin-left: 20px;
    text-align: right;
    font-size: 0.9em;
    color: var(--dark-accent);
}

.conversion-item-progress.success {
    color: #4CAF50; /* Green for success */
    font-weight: bold;
}

.conversion-item-progress.error {
    color: #f44336; /* Red for error */
    font-weight: bold;
}

.converted-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.converted-image-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.light-mode .converted-image-item {
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

.converted-image-item img {
    max-width: 100%;
    max-height: 120px; /* Limit image preview height */
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: contain;
    background-color: rgba(0,0,0,0.1); /* fallback for transparency */
}

.converted-image-info {
    flex-grow: 1;
}

.converted-image-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

.converted-image-info strong {
    color: var(--primary-light);
}

.converted-image-actions {
    margin-top: 15px;
}

.converted-image-actions .btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px 15px;
    font-size: 0.9em;
}

.download-all-wrapper {
    margin-top: 30px;
    text-align: center;
}

/* Error Messages */
.error-messages {
    margin-top: 25px;
    background-color: rgba(244, 67, 54, 0.15); /* Red with transparency */
    border: 1px solid #f44336;
    border-radius: 8px;
    padding: 15px 20px;
    color: #f44336;
    font-weight: 500;
    display: none; /* Hidden by default, shown by JS */
}

.error-messages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-messages ul li {
    margin-bottom: 5px;
}

/* How to Use and FAQ Sections */
.how-to-use-section, .faq-section {
    margin-top: 40px;
    padding: 25px;
    background-color: var(--benefits-bg); /* Use benefits background for these sections */
    border: var(--benefits-border);
    border-radius: 12px;
    color: var(--dark-text);
    box-shadow: var(--tool-card-shadow);
}

.how-to-use-section .section-header, .faq-section .section-header {
    background-image: var(--section-header-gradient);

    -webkit-text-fill-color: transparent;
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

.how-to-use-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.how-to-use-list li {
    background-color: var(--faq-item-bg);
    border: var(--faq-item-border);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.light-mode .how-to-use-list li {
    background-color: var(--faq-item-bg);
    border: var(--faq-item-border);
    color: var(--light-text);
}

.how-to-use-list li strong {
    color: var(--primary-medium);
}

.how-to-use-list ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-top: 10px;
}


.faq-container {
    margin-top: 20px;
}

.faq-item {
    background-color: var(--faq-item-bg);
    border: var(--faq-item-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.light-mode .faq-item {
    background-color: var(--faq-item-bg);
    border: var(--faq-item-border);
    color: var(--light-text);
}

.faq-question {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question::after {
    content: '\25B6'; /* Right arrow */
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(90deg); /* Down arrow */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    color: var(--dark-text);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding-bottom: 15px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .image-converter-card {
        padding: 20px;
    }

    .drop-area {
        padding: 25px 15px;
    }

    .icon-upload {
        font-size: 3em;
    }

    .drop-text {
        font-size: 1em;
    }

    .max-info {
        font-size: 0.8em;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .file-name, .file-size {
        margin-left: 0;
        text-align: left;
        width: 100%;
    }

    .file-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        margin-left: 0;
    }

    .options-group {
        padding: 15px;
    }

    .resize-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .x-separator {
        display: none;
    }

    .btn-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .converted-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .how-to-use-section .section-header, .faq-section .section-header {
        font-size: 1.6em;
    }

    .faq-question {
        font-size: 0.95em;
    }
}

/* Step Progress Bar */
.conversion-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.conversion-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-light);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.6;
}

.step.active {
    opacity: 1;
}

.step span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text);
    font-weight: bold;
    margin-bottom: 10px;
    border: 3px solid var(--primary-light);
    transition: var(--transition);
}

.step.active span {
    background-color: var(--primary-dark);
    border-color: var(--primary-medium);
    transform: scale(1.1);
}

.step p {
    font-weight: 500;
    color: var(--dark-text);
    text-align: center;
    font-size: 0.9em;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* NEW: Step 1 Two-Column Layout Styles */
.step1-content-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 30px; /* Space between columns */
    margin-bottom: 30px;
}

.step1-left-column {
    flex: 1; /* Takes up available space */
    min-width: 280px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between buttons */
}

.step1-right-column {
    flex: 2; /* Takes up more space */
    min-width: 320px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between drag/drop and URL input */
}

/* Upload Options - Adjusted for new layout */
.upload-option {
    background-color: var(--dark-bg);
    border-radius: 12px;
    padding: 8px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    height: 100%; /* Make both buttons in the left column take equal height */
    display: flex; /* For vertical centering of content */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.light-mode .upload-option {
    background-color: var(--light-menu-bg);
}

.upload-option:hover {
    transform: translateY(-5px);
    border-color: var(--primary-medium);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.upload-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 5px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    color: var(--primary-dark);
}

.upload-option h3 {
    margin-bottom: 0px;
    color: var(--dark-text);
    font-size: 1.1em;
}

.upload-option p {
    font-size: 0.9em;
    color: var(--dark-accent);
    margin: 0;
}

/* Enhanced Drop Area - adjustments for the new layout */
/* Original drop-area and its children properties are already defined above and are fine.
   These are overrides or specific additions for this context. */
.drop-area {
    border: 2px dashed var(--primary-medium); /* Changed from 3px back to 2px for consistency */
    border-radius: 15px; /* Changed from 10px back to 15px for consistency */
    padding: 20px 20px; /* Changed from 40px top/bottom to 30px */
    min-height: 180px; /* Changed from 200px to 180px for consistency */
    background-color: var(--dark-bg);
    flex-grow: 1; /* Allows it to take up available space in the right column */
    display: flex; /* To center content within */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.light-mode .drop-area {
    background-color: var(--light-menu-bg);
}


.icon-upload {
    font-size: 3.2em; /* Changed from 3.5em to 3.2em for consistency */
    margin-bottom: 15px;
    color: var(--primary-medium);
}

.drop-text {
    font-size: 1.1em; /* Changed from 1.2em to 1.1em for consistency */
    font-weight: 500; /* Changed from 600 to 500 for consistency */
    margin-bottom: 5px;
    color: var(--dark-text);
}

.max-info {
    font-size: 0.85em;
    color: var(--dark-accent);
}


/* Form Elements Enhancements (from original file, no changes needed for this context) */
.select-wrapper, .slider-container, .resize-container {
    position: relative;
}

.select-wrapper i, .slider-container i, .resize-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-medium);
    font-size: 1.1em;
}

.tool-select {
    padding-left: 45px !important;
}

.slider-container {
    padding-left: 35px;
}

.resize-container {
    padding-left: 35px;
}

.tool-range-slider {
    width: calc(100% - 50px);
    margin-right: 10px;
}

.resize-inputs {
    gap: 10px;
}

.tool-input-small {
    text-align: center;
    padding: 10px;
}

/* Processing Section Enhancements (from original file, no changes needed for this context) */
.processing-header, .results-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.processing-header i {
    font-size: 1.8em;
    color: var(--primary-medium);
}

.results-header i {
    font-size: 1.8em;
    color: #4CAF50;
}

.progress-bar-overall {
    height: 12px;
    border-radius: 6px;
}

.progress-bar-fill {
    border-radius: 6px;
}

/* Results Section (from original file, no changes needed for this context) */
.results-header h3 {
    color: #4CAF50;
}

.converted-image-item {
    border: 1px solid var(--primary-light);
}

/* Buttons (from original file, no changes needed for this context) */
.btn i {
    margin-right: 8px;
}

.download-all-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

/* Responsive Adjustments for the new layout (from original file, no changes needed for this context) */
@media (max-width: 768px) {
    .step1-content-wrapper {
        flex-direction: column; /* Stack columns on small screens */
        gap: 20px;
    }

    .step1-left-column,
    .step1-right-column {
        min-width: unset; /* Remove min-width on small screens */
        width: 100%; /* Take full width */
    }

    .upload-option {
        height: auto; /* Allow height to adjust naturally */
        padding: 20px 15px;
    }

    /* Other responsive adjustments already present in the original file */
    .conversion-steps {
        gap: 5px;
    }

    .step span {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    .step p {
        font-size: 0.8em;
    }

    .upload-options {
        grid-template-columns: 1fr;
    }
}