/* ── Award Framer Public Styles ── */
/* All selectors prefixed with .award-framer- to avoid theme conflicts */

/* ── Container ── */
.award-framer-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* ── Frame Selector ── */
.award-framer-frame-selector {
    margin-bottom: 1.5rem;
    text-align: center;
}

.award-framer-frame-selector > label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.award-framer-frame-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.award-framer-frame-thumb {
    width: 80px;
    height: 100px;
    border: 3px solid #ccc;
    border-radius: 8px;
    padding: 4px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.award-framer-frame-thumb:hover {
    border-color: #2271b1;
    transform: scale(1.05);
}

.award-framer-frame-thumb.active {
    border-color: #00C853;
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.4);
}

.award-framer-frame-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Form Section ── */
.award-framer-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.award-framer-input-group {
    flex: 1;
    min-width: 250px;
}

.award-framer-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.award-framer-input-group input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0.75rem 1rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.award-framer-input-group input[type="text"]:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 6px rgba(34, 113, 177, 0.2);
}

.award-framer-input-group input[type="file"] {
    width: 100%;
    height: 48px;
    padding: 0.6rem;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
}

.award-framer-input-group input[type="file"]:hover {
    border-color: #2271b1;
    background: rgba(34, 113, 177, 0.03);
}

.award-framer-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

/* ── Canvas Container ── */
.award-framer-canvas-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: 0 auto 0.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #ddd;
    background: #1a1a2e;
}

#award-framer-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
}

#award-framer-canvas:active {
    cursor: grabbing;
}

.award-framer-canvas-instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.award-framer-canvas-instructions.visible {
    opacity: 1;
}

.award-framer-canvas-instructions p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.2rem 0;
}

/* ── Controls ── */
.award-framer-controls-hint {
    text-align: center;
    margin: 0.25rem 0 0.5rem;
}

.award-framer-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 12px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.award-framer-control-group {
    text-align: center;
}

.award-framer-control-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.award-framer-button-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
}

.award-framer-control-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.award-framer-control-btn:hover {
    border-color: #2271b1;
    background: #f0f6fc;
    transform: scale(1.05);
}

.award-framer-control-btn:active {
    transform: scale(0.95);
}

.award-framer-center-btn {
    background: #f0f6fc;
}

.award-framer-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

#award-framer-zoom-level,
#award-framer-rotation-level {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
}

.award-framer-reset-btn {
    width: auto;
    padding: 0 1rem;
    font-size: 0.9rem;
}

/* ── Download Section ── */
.award-framer-download-section {
    text-align: center;
    padding: 0.5rem 0;
    max-width: 540px;
    margin: 0 auto;
}

.award-framer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.award-framer-download-btn {
    background: #2271b1;
    color: #fff;
}

.award-framer-download-btn:hover {
    background: #135e96;
    transform: scale(1.02);
}

/* ── Loading State ── */
.award-framer-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.award-framer-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid transparent;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: award-framer-spin 1s linear infinite;
}

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

/* ── Success Message ── */
.award-framer-success-message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: #00a32a;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 163, 42, 0.4);
    animation: award-framer-slide-in 0.3s ease-out;
    z-index: 99999;
}

@keyframes award-framer-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ── Mobile tweaks ── */
@media (max-width: 600px) {
    .award-framer-form {
        flex-direction: column;
    }

    .award-framer-controls {
        flex-direction: column;
        gap: 1.5rem;
    }
}
