/* General Image Upload Styles for all image tools */

.image-upload-area {
   border: 2px dashed var(--primary-medium);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05); /* Slightly lighter background */
    margin-bottom: 25px;
  position: relative;
}
.image-upload-area.highlight {
  border-color: #2196f3;
  background: #e3f2fd;
}

.image-upload-area .upload-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom:10px;
}
.image-upload-area .upload-hint {
  font-size: 0.95rem;
  color: #888;
      margin: 20px 0;
}

#imageFileList, .image-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
  background: var(--dark-menu-bg);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  margin-bottom: 12px;
  margin-top: 20px;
}
.image-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: var(--benefit-card-border);
  font-size: 1rem;
}
.image-file-item:last-child {
  border-bottom: none;
}
.image-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-file-remove {
  background: none;
  border: none;
  color: #e53935;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.2s;
}
.image-file-remove:hover {
  color: #b71c1c;
}

#imageUploadErrors, .image-upload-errors {
  color: #e53935;
  background: #fff3f3;
  border: 1px solid #ffcdd2;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 10px;
  display: none;
  font-size: 1rem;
}

.tool-step {
 background: var(--tool-card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--tool-card-shadow);
    margin-top: 20px;
}

.tool-step h2 {
    color: var(--dark-text);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8em;
    background: var(--section-header-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.download-container {
 margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}
.success-message {
  color: var(--primary-medium);
    font-size: 1.2em;
    margin-bottom: 18px;
}
.success-icon {
   font-size: 3em;
    color: #28a745;
    margin-bottom: 0.2em;
}
.download-options {
      display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.files-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 0.5fr));
  gap: 18px;
  margin: 24px 0 16px 0;
  justify-content: center;
}

.converted-image-item img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 4px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.converted-image-info {
  font-size: 0.98rem;
  color: #333;
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
}
.converted-image-info p {
  margin: 0 0 2px 0;
  font-size: 0.97rem;
}
.converted-image-actions {
  margin-top: 4px;
  width: 100%;
  text-align: right;
}
.converted-image-actions .btn {
  font-size: 0.97rem;
  padding: 5px 12px;
}

/* --- General Download Step UI Styles for All Image Tools (moved from image-converter.css) --- */

.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 {
    
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border: var(--benefit-card-border);
    align-items: center;
}



.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 */
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.converted-image-info {
    flex-grow: 1;
    font-size: 0.98rem;
    color: #333;
    margin-bottom: 8px;
    width: 100%;
    text-align: left;
}

.converted-image-info p {
    margin: 0 0 2px 0;
    font-size: 0.97rem;
    color: var(--primary-color);
}

.converted-image-info strong {
    color: var(--primary-light);
}

.converted-image-actions {
    margin-top: 15px;
    width: 100%;
    text-align: right;
}

.converted-image-actions .btn {
    font-size: 0.97rem;
    padding: 5px 12px;
    width: 100%;
    margin-top: 10px;
    font-size: 0.9em;
}

.download-all-wrapper {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .converted-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }
        .download-options {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 600px) {
  .tool-step {
    padding: 25px
  }
  .files-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
} 

/* === Step Progress Bar Styles (EXACT MATCH to PDF Tools) === */
.step-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 100%;
    margin: 2rem 0;
    padding: 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    transition: var(--transition);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--primary-medium);
    border: 3px solid var(--primary-medium);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: var(--primary-medium);
    opacity: 0.7;
    transition: var(--transition);
    line-height: 1.3;
}

/* Active step styling */
.step.active .step-number {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(22, 66, 60, 0.3);
    transform: scale(1.1);
}

.step.active .step-number::before {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.step.active .step-number {
    color: transparent;
}

.step.active .step-name {
    color: var(--primary-dark);
    opacity: 1;
    font-weight: 600;
}

/* Progress line between steps */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(50% + 25px);
    width: calc(100% - 50px);
    height: 3px;
    background: var(--primary-light);
    opacity: 0.3;
    z-index: 1;
    border-radius: 2px;
    transition: var(--transition);
}

.step.active:not(:last-child)::after {
    background: var(--primary-medium);
    opacity: 1;
}

/* Hover effects */
.step:hover .step-number {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(22, 66, 60, 0.2);
}

.step:hover .step-name {
    opacity: 1;
}

/* Light mode adjustments */
.light-mode .step-name {
    color: var(--primary-dark);
}

.light-mode .step.active .step-number::before {
    color: white;
}

.light-mode .step.active .step-name {
    color: var(--primary-dark);
}

.light-mode .step:hover .step-number {
    box-shadow: 0 4px 12px rgba(22, 66, 60, 0.15);
}

@media (max-width: 768px) {
    .step-progress-bar {
        padding: 0 0.5rem;
        margin: 1.5rem 0;
    }
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    .step-name {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    .step:not(:last-child)::after {
        top: 20px;
        left: calc(50% + 20px);
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .step-progress-bar {
        flex-direction: column;
        gap: 1.5rem;
    }
    .step-progress-bar::before {
        display: none;
    }
    .step {
        flex-direction: row;
        max-width: 100%;
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
        background: var(--home-tool-card-bg);
        border: var(--home-tool-card-border);
        border-radius: 12px;
        backdrop-filter: blur(10px);
    }
    .step-number {
        margin-bottom: 0;
        margin-right: 1rem;
        flex-shrink: 0;
    }
    .step-name {
        text-align: left;
        flex: 1;
    }
    .step:not(:last-child)::after {
        display: none;
    }
} 

.remote-url-group {
    display: flex;
    text-align: left;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    align-items: center;
    gap: 20px;
}

.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);
}

/* 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 */
}
