/* AI Image Generator Public Styles */

.aig-public-generator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Styles */
.aig-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.aig-form-group {
    margin-bottom: 20px;
}

.aig-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.aig-form-group textarea,
.aig-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.aig-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.aig-form-group select {
    background-color: #fff;
    cursor: pointer;
}

.aig-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Button Styles */
.aig-generate-button {
    background: #0073aa;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.aig-generate-button:hover {
    background: #005a87;
}

.aig-generate-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Spinner */
.aig-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: aig-spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Result Styles */
.aig-public-result {
    margin-top: 30px;
    text-align: center;
}

.aig-result-image {
    margin-bottom: 20px;
}

.aig-result-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Multiple Images Grid */
.aig-result-image.aig-multiple-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    text-align: left;
}

.aig-image-wrapper {
    position: relative;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aig-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.aig-image-actions {
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.aig-download-single {
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.aig-download-single:hover {
    background: #005a87;
}

.aig-download-all {
    padding: 12px 24px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s;
    margin: 20px auto;
    display: block;
}

.aig-download-all:hover {
    background: #218838;
}

.aig-download-all:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.aig-result-actions button {
    margin: 0 10px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.aig-result-actions button:hover {
    background: #f0f0f0;
    border-color: #999;
}

.aig-download {
    background: #0073aa !important;
    color: #fff !important;
    border-color: #0073aa !important;
}

.aig-download:hover {
    background: #005a87 !important;
}

/* Error Styles */
.aig-public-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    border: 1px solid #f5c6cb;
}

.aig-public-error p {
    margin: 0;
}

/* Login Notice */
.aig-login-notice {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.aig-login-notice p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #666;
}

.aig-login-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.aig-login-button:hover {
    background: #005a87;
    color: #fff;
}

/* Watermark Upload Styles */
.aig-watermark-upload {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    background: #fafafa;
    transition: all 0.3s ease;
}

.aig-watermark-upload.drag-over {
    border-color: #0073aa;
    background: #f0f8ff;
}

.aig-dropzone-content p {
    margin: 0 0 5px 0;
    color: #666;
}

.aig-dropzone-content small {
    color: #999;
    font-size: 12px;
}

.aig-browse-link {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.aig-browse-link:hover {
    color: #005a87;
}

.aig-watermark-preview {
    position: relative;
}

.aig-watermark-preview img {
    max-width: 150px;
    max-height: 150px;
    margin: 10px auto;
    display: block;
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
}

.aig-remove-watermark {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(75px);
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.aig-remove-watermark:hover {
    background: #c82333;
}

/* Watermark Settings */
.aig-watermark-settings {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.aig-watermark-settings .aig-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 0;
}

.aig-watermark-settings .aig-form-group {
    margin-bottom: 0;
}

.aig-watermark-settings label {
    font-size: 14px;
    margin-bottom: 5px;
}

.aig-watermark-settings select {
    font-size: 14px;
    padding: 8px;
}

.aig-range-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aig-range-wrapper input[type="range"] {
    flex: 1;
    margin: 0;
}

.aig-range-value {
    min-width: 40px;
    font-weight: 600;
    color: #333;
}

@media (max-width: 768px) {
    .aig-watermark-settings .aig-form-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .aig-form-row {
        grid-template-columns: 1fr;
    }
    
    .aig-public-generator {
        padding: 10px;
    }
    
    .aig-form {
        padding: 20px;
    }
    
    .aig-result-actions button {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

/* Enhance Prompt Button */
.aig-enhance-btn {
    background: #f7f7f7;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    line-height: normal;
}

.aig-enhance-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

.aig-enhance-btn .dashicons {
    color: #f0ad4e;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    vertical-align: middle;
}

.aig-enhance-btn:hover .dashicons {
    color: #ec971f;
}

/* Ensure dashicons display properly */
.aig-enhance-btn .dashicons:before {
    content: "\f155";
}

.aig-enhance-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aig-enhance-wrapper {
    margin-top: 10px;
}

.aig-enhance-status {
    margin-left: 10px;
    font-size: 14px;
    display: inline-block;
    vertical-align: middle;
}

.aig-original-prompt {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f9f9f9;
    border-radius: 3px;
    border-left: 3px solid #ffba00;
    font-size: 13px;
}

.aig-original-prompt small {
    color: #666;
}

.aig-original-prompt a {
    margin-left: 10px;
    color: #0073aa;
    text-decoration: none;
}

.aig-original-prompt a:hover {
    text-decoration: underline;
}