/* =====================
   ImageHubZone - Frontend CSS
   ===================== */

.ihz-tool-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 60px auto;
    padding: 20px;
    box-sizing: border-box;
}

.ihz-tool-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.ihz-tool-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
    line-height: 1.2;
}

.ihz-tool-description {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 30px;
}

/* Upload Box */
.ihz-upload-box {
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    transition: 0.3s ease;
    background: #f9fafb;
    cursor: pointer;
}

.ihz-upload-box:hover,
.ihz-upload-box.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.ihz-upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ihz-upload-icon { margin-bottom: 12px; }

.ihz-upload-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
}

.ihz-drag-text {
    color: #9ca3af;
    font-size: 14px;
    margin-top: 8px;
}

/* File Info */
.ihz-file-info {
    display: none;
    text-align: center;
    margin-bottom: 15px;
}

.ihz-file-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

/* Submit Button */
.ihz-submit-btn {
    width: 100%;
    height: 55px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.ihz-submit-btn:hover { background: #1d4ed8; }
.ihz-submit-btn:disabled { background: #93c5fd; cursor: not-allowed; }

/* Progress */
.ihz-progress {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 50px;
    margin-top: 25px;
    overflow: hidden;
    display: none;
}

.ihz-progress-bar {
    width: 0%;
    height: 100%;
    background: #2563eb;
    transition: width 0.3s ease;
}

/* Processing spinner */
.ihz-processing {
    display: none;
    text-align: center;
    padding: 40px;
}

.ihz-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ihz-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes ihz-spin { to { transform: rotate(360deg); } }

.ihz-processing p {
    margin-top: 15px;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

/* Result */
.ihz-result { margin-top: 25px; }

.ihz-success-box {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.ihz-success-box p {
    font-size: 16px;
    font-weight: 600;
    color: #166534;
    margin: 0 0 16px;
}

.ihz-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 52px;
    padding: 0 25px;
    border-radius: 12px;
    background: #16a34a;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s ease;
}

.ihz-download-btn:hover { background: #15803d; }

.ihz-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 15px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

/* Start Over */
.ihz-start-over-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 24px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
}

.ihz-start-over-btn:hover { background: #f3f4f6; }

/* Result actions */
.ihz-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Preview image */
.ihz-preview-img {
    max-width: 100%;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Image grid */
.ihz-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.ihz-img-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    text-align: center;
    padding: 8px;
}

.ihz-img-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.ihz-img-item p {
    margin: 6px 0 2px;
    font-size: 12px;
    color: #6b7280;
}

.ihz-img-item span {
    font-size: 11px;
    color: #9ca3af;
}

/* Field */
.ihz-field {
    margin-bottom: 20px;
}

.ihz-field label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 14px;
}

.ihz-field select,
.ihz-field input[type="number"],
.ihz-field input[type="text"] {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
}

/* Note */
.ihz-note {
    text-align: center;
    font-size: 13px;
    color: #2563eb;
    font-style: italic;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .ihz-tool-card { padding: 25px; }
    .ihz-tool-title { font-size: 28px; }
    .ihz-upload-box { padding: 35px 15px; }
    .ihz-submit-btn { font-size: 16px; }
}

/* =====================
   Image Tools colourful grid — [ihz_tools]
   Tools are grouped into categories (Convert / Edit / AI Remove /
   Extract), each with its own two-colour gradient set via --c1/--c2
   inline custom props, so the grid reads as organised colour-families.
   ===================== */
.ihzg-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:18px;
    max-width:1100px;
    margin:40px auto;
    padding:0 20px;
    box-sizing:border-box;
}
.ihzg-card{
    position:relative;
    display:block;
    overflow:hidden;
    background:#fff;
    border:1px solid #e9e9f2;
    border-radius:16px;
    padding:22px 18px 26px;
    text-decoration:none;
    color:#171522;
    transition:transform .18s ease, box-shadow .18s ease;
}
.ihzg-card::after{
    content:"";
    position:absolute; top:0; left:0; right:0; height:4px;
    background:linear-gradient(90deg, var(--c1), var(--c2));
}
.ihzg-card:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 30px -12px var(--c1);
}
.ihzg-chip{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:50px; height:28px; padding:0 10px;
    border-radius:8px;
    font-size:12px; font-weight:800; letter-spacing:.03em;
    color:#fff;
    background:linear-gradient(135deg, var(--c1), var(--c2));
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
.ihzg-cat{
    display:inline-block; margin-left:8px;
    font-size:11px; font-weight:700;
    color:var(--c1);
    vertical-align:middle;
}
.ihzg-name{
    margin:16px 0 0;
    font-size:16px;
    font-weight:700;
    line-height:1.3;
    color:#171522;
}
@media(max-width:480px){
    .ihzg-grid{ grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; }
    .ihzg-card{ padding:16px 14px 18px; }
}
