/**
 * RA2 Image Editor - Tool-specific styles
 */

.ra2-edit-upload {
    max-width: 720px;
    margin: 20px auto 8px;
    text-align: center;
}

.ra2-edit-upload h5 {
    margin: 0 0 6px;
}

.ra2-edit-upload-hint {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px;
}

.ra2-edit-drop {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.ra2-edit-drop:hover,
.ra2-edit-drop.is-dragover {
    border-color: #f17d34;
    background: #fff7f0;
}

.ra2-edit-drop.needs-source {
    border-color: #e53935;
}

.ra2-edit-placeholder {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ra2-edit-placeholder i {
    font-size: 48px;
    color: #999;
    margin-bottom: 10px;
}

.ra2-edit-placeholder p {
    margin: 0;
    color: #666;
}

.ra2-edit-placeholder .ra2-edit-subhint {
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.ra2-edit-preview-wrap img {
    max-width: 100%;
    max-height: 320px;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.ra2-edit-preview-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    word-break: break-all;
}

.ra2-edit-url {
    max-width: 620px;
    margin: 16px auto 0;
    text-align: left;
}

.ra2-edit-url label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.ra2-edit-url input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    font-size: 15px;
}

.resolutions-ai {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 2px 20px;
    margin: 20px auto;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.resolution-radio-elem {
    margin: 8px 0;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    width: 100%;
}

.resolution-radio-elem:hover {
    background-color: rgba(241, 125, 52, 0.1);
}

.resolutions-ai .resolution-radio-elem label,
.resolutions-ai .chip-p {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.resolutions-ai .chip-p {
    justify-content: space-between;
    margin: 0;
    flex-wrap: nowrap;
}

.resolution-radio-elem .mdl-radio.is-checked .mdl-radio__outer-circle {
    border-color: #f17d34;
}

.resolution-radio-elem .mdl-radio.is-checked .mdl-radio__inner-circle {
    background: #f17d34;
}

.ar-ar {
    font-weight: bold;
    color: #f17d34;
    margin-right: 8px;
    flex-shrink: 0;
}

.right-dd {
    position: static;
    margin-left: auto;
    white-space: nowrap;
    color: #666;
    font-size: 0.9em;
}

#createrea2editprompt {
    font-size: 16px;
    line-height: 1.5;
    padding: 12px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

#createrea2editprompt:focus {
    border-color: #f17d34;
    outline: none;
}

.make-art-button {
    background: linear-gradient(135deg, #f17d34 0%, #e66a20 100%);
    box-shadow: 0 4px 15px rgba(241, 125, 52, 0.3);
    transition: all 0.3s;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.make-art-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 125, 52, 0.4);
}

.make-art-button:active {
    transform: translateY(0);
}

.api-balance {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    margin: 10px 0;
    font-weight: 500;
}

.api-credits-balance-usd {
    color: #4CAF50;
    font-weight: bold;
}

#create-ai-loading-progress {
    margin: 20px 0;
}

#createdRA2EditList {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#createdRA2EditList .ra2-edit-item {
    position: relative;
    border-radius: 8px;
    background: #f5f5f5;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

#createdRA2EditList .ra2-edit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.ra2-edit-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
}

.ra2-edit-pane {
    position: relative;
    margin: 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.ra2-edit-pane img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.ra2-edit-pane figcaption {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.ra2-edit-item .image-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.image-actions .action-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: #333;
}

.image-actions .action-btn:hover {
    background: #f17d34;
    color: #fff;
    transform: scale(1.1);
}

.image-actions .action-btn i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .resolutions-ai {
        padding: 15px;
        margin: 15px auto;
    }

    .ra2-edit-compare {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ra2-edit-item .image-actions {
        bottom: 14px;
        right: 14px;
    }
}

@media (max-width: 480px) {
    .make-art-button {
        width: 100%;
        padding: 12px;
    }

    .ra2-edit-item .image-actions {
        bottom: 12px;
        right: 12px;
        gap: 4px;
    }

    .image-actions .action-btn {
        width: 28px;
        height: 28px;
    }

    .image-actions .action-btn i {
        font-size: 16px;
    }
}
