
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&family=Open+Sans:wght@400;600&display=swap');

.aihd-form, .aihd-generations, .aihd-masonry-gallery {
    font-family: 'Open Sans', sans-serif;
    color: #333333;
}

.aihd-form h2, .aihd-masonry-gallery h2, .aihd-gallery-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #007BFF;
}

/* Form Styles */
.aihd-form {
    margin: 50px auto;
    padding: 20px 40px;
    background: #2a2a58;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.aihd-form:hover {
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.25);
}

.aihd-form h2 {
    color:#ceceee;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid #ceceee;
}

.aihd-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ceceee;
    transition: color 0.2s ease;
}

/* Style for the custom upload button */
.aihd-form .custom-file-upload {
    padding: 14px 16px;
    margin-bottom: 25px;
    border-radius: 10px;
    background: #4d4dbd;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition:0.6s;
}

/* Hover and focus states for the custom button */
.aihd-form .custom-file-upload:hover,
.aihd-form .custom-file-upload:focus {
    background-color: #7878cd;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
        transition:0.6s;

}

/* Style for the image preview */
.aihd-form .image-preview {
    max-width: 100%;
    margin-bottom: 25px;
    border-radius: 10px;
    display: none; /* Hidden until an image is selected */
}

/* Show the image when loaded */
.aihd-form .image-preview.active {
    display: block;
}

/* Hide the default file input */
.aihd-form input[type="file"] {
    display: none;
}

/* Maintain select styling as provided */
.aihd-form select {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 25px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.aihd-form select:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}
.centered-label{
    text-align: center;
}

.aihd-form button {
    width: 100%;
    background: linear-gradient(135deg, #007BFF 0%, #005f8f 100%);
    color: #FFFFFF;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.aihd-form button:hover {
    background: linear-gradient(135deg, #005f8f 0%, #004a72 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.aihd-form button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.aihd-form button:disabled:hover {
    background: #cccccc;
    transform: none;
}

/* Dynamic Widgets Container */
.aihd-dynamic-widgets {
    margin-bottom: 20px;
}

/* Loading Indicator */
.aihd-loading {
    margin-top: 20px;
    font-size: 1rem;
    color: #666666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aihd-loading .spinner {
    width: 24px;
    height: 24px;
    border: 4px solid rgba(0, 123, 255, 0.2);
    border-top: 4px solid #007BFF;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Test Result */
#aihd-test-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    background: #f0f8ff;
    border: 1px solid rgba(0, 123, 255, 0.2);
    font-size: 1rem;
    color: #333333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Generations Table */
.aihd-generations {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.aihd-generations th, .aihd-generations td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.aihd-generations th {
    background: linear-gradient(135deg, #007BFF 0%, #005f8f 100%);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 1.1rem;
}

.aihd-generations td {
    background: #FFFFFF;
    font-size: 1rem;
    color: #666666;
    transition: background 0.2s ease;
}

.aihd-generations tr:hover td {
    background: #f0f8ff;
}

.aihd-generations td img {
    max-width: 150px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.aihd-generations td img:hover {
    transform: scale(1.05);
}

/* Masonry Gallery */
.aihd-masonry-gallery {
    width: 100%;
    margin-top: 40px;
}

.aihd-gallery-item {
    width: calc(33.33% - 20px); /* 3-column layout with gutter */
    margin: 10px;
    background: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.aihd-gallery-item:hover {
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.2);
    transform: translateY(-5px);
}

.aihd-gallery-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #005f8f;
    text-align: center;
}

.aihd-before-after {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.aihd-before, .aihd-after {
    width: 48%;
    text-align: center;
}

.aihd-before p, .aihd-after p {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666666;
}

.aihd-before img, .aihd-after img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.aihd-before img:hover, .aihd-after img:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .aihd-form {
        max-width: 90%;
        padding: 30px;
    }

    .aihd-gallery-item {
        width: calc(50% - 20px); /* 2-column on tablet */
    }
}

@media (max-width: 768px) {
    .aihd-form {
        padding: 20px;
    }

    .aihd-form h2 {
        font-size: 1.8rem;
    }

    .aihd-form button {
        font-size: 1.1rem;
    }

    .aihd-before-after {
        flex-direction: column;
    }

    .aihd-before, .aihd-after {
        width: 100%;
        margin-bottom: 15px;
    }

    .aihd-gallery-item {
        width: calc(100% - 20px); /* 1-column on mobile */
    }

    .aihd-generations th, .aihd-generations td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Additional AI-Like Effects */
.aihd-form::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
    z-index: -1;
    border-radius: 20px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.aihd-form:hover::before {
    opacity: 1;
}

/* Error and Success Messages */
.aihd-result p[style*="color:green"] {
    background: rgba(0, 208, 132, 0.1); /* Green accent */
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #00D084;
}

.aihd-result p[style*="color:red"] {
    background: rgba(255, 107, 107, 0.1); /* Red accent */
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #FF6B6B;
}



    .space-selection,.widget-selection {
            margin: 20px 0;
            color:#fff;
        }
        .space-selection h3,.widget-selection h3 {
            text-align:left;
            font-weight:600;
            color:#ceceee;
        }
        .space-tiles {
            display: flex;
            flex-wrap: nowrap;
            overflow-x: auto;
            gap: 15px;
            padding: 10px;
            scrollbar-width: thin;
            scrollbar-color: #888 #f1f1f1;
        }
        .space-tiles::-webkit-scrollbar {
            height: 8px;
        }
        .space-tiles::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .space-tiles::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }
        .space-tiles::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        .space-tile {
            flex: 0 0 auto;
            width: 120px;
            height: 120px;
            border: 2px solid #ddd;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: border-color 0.3s;
        }
        .space-tile:hover, .space-tile.selected {
            border-color: #007bff;
        }
        .space-tile img {
            max-width: 60px;
            max-height: 60px;
            margin-bottom: 10px;
        }
        .space-tile span {
            font-size: 14px;
            text-align: center;
        }
        .widget-selection .widget-tiles {
            display: flex;
            flex-wrap: nowrap;
            overflow-x: auto;
            gap: 15px;
            padding: 10px;
            scrollbar-width: thin;
            scrollbar-color: #888 #f1f1f1;
        }
        .widget-selection .widget-tiles::-webkit-scrollbar {
            height: 8px;
        }
        .widget-selection .widget-tiles::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .widget-selection .widget-tiles::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }
        .widget-selection .widget-tiles::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        .widget-tile {
            flex: 0 0 auto;
            width: 120px;
            height: 120px;
            border: 2px solid #ddd;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: border-color 0.3s;
        }
        .widget-tile:hover, .widget-tile.selected {
            border-color: #007bff;
        }
        .widget-tile img {
            /*max-width: 60px;*/
            max-height: 70px;
            margin-bottom: 10px;
        }
        .widget-tile span {
            font-size: 14px;
            text-align: center;
        }
        
        
        .aihd-overlay {
  position: relative;
  background: rgba(255,255,255,0.6);
  padding: 30px;
  text-align: center;
  margin-top: 20px;
}

.aihd-spinner-text {
  display: inline-block;
  text-align: center;
}

.aihd-spinner-text .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
