.frame-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.frame-modal-overlay.active {
    opacity: 1;
}

.frame-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    padding: 0;
}

.frame-modal-close:hover {
    color: #222;
}

.frame-preview-container {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
    padding: 20px 24px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    font-family: inherit;
}

.frame-modal-overlay.active .frame-preview-container {
    transform: scale(1);
}

.frame-preview-container h3 {
    text-align: center;
    margin-bottom: 16px;
    color: #222222;
    font-size: 20px;
    font-weight: 500;
}

.frame-preview-wrapper {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 100%;
    margin: 0 auto;
    justify-content: space-between;
    align-items: stretch;
}

.frame-type-select,
.frame-preview-box,
.frame-upload-section {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.frame-type-label {
    font-weight: 600;
    color: #222222;
    font-size: 16px;
    display: block;
}

.frame-type-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
}

.frame-type-radio-group::-webkit-scrollbar {
    width: 6px;
}

.frame-type-radio-group::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 4px;
}

.frame-type-radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #444444;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-right: 0 !important;
    border: 1px solid transparent;
    background: #fafafa;
}

.frame-type-radio-label:hover {
    background: #f0f0f0;
}

.frame-type-radio-label.checked,
.frame-type-radio-label:has(input:checked) {
    background: #ffffff;
    border-color: #222222;
    color: #222222;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.frame-type-radio {
    accent-color: #222222;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.frame-preview-box {
    align-items: center;
    justify-content: center;
}

#framePreviewCanvas {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.frame-upload-section {
    gap: 14px;
}

.upload-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px 28px;
    border: 2px dashed #c8c8c8;
    border-radius: 14px;
    background: #fbfbfc;
    transition: all 0.25s ease;
    cursor: pointer;
}

.upload-dropzone:hover {
    border-color: #222222;
    background: #f3f3f6;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.upload-icon {
    color: #999;
    margin-bottom: 10px;
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.upload-dropzone:hover .upload-icon {
    color: #555;
}

.upload-label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
    text-align: center;
    margin: 0;
    cursor: pointer;
    transition: color 0.25s ease;
}

.upload-dropzone:hover .upload-label {
    color: #222;
}

.frame-upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.upload-specs {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-spec {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #999;
    background: #f8f8f8;
    padding: 5px 10px;
    border-radius: 20px;
}

.upload-spec svg {
    flex-shrink: 0;
}

.file-selected-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #ecfdf3;
    border-left: 3px solid #22c55e;
    border-radius: 8px;
    animation: mvpFadeIn 0.3s ease;
}

.file-selected-info svg {
    color: #22c55e;
    flex-shrink: 0;
}

.file-name {
    margin: 0;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
}

.file-name strong {
    font-weight: 600;
}

@keyframes mvpFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.button.reset-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ffffff;
    color: #888;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button.reset-preview:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    color: #222;
}

.print-disclaimer {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.disclaimer-title {
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    transition: color 0.2s;
}

.disclaimer-title:hover {
    color: #666;
}

.disclaimer-content {
    margin-top: 8px;
    font-size: 11px;
    color: #aaa;
    line-height: 1.6;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.disclaimer-content p {
    margin: 0;
}

.button.whatsapp-send {
    background-color: #222222;
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.2s ease;
}

.button.whatsapp-send:hover {
    background-color: #000000;
    transform: translateY(-1px);
}

p#drag-hint {
    font-weight: bolder;
}

@media (max-width: 992px) {
    .frame-preview-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .frame-type-select,
    .frame-preview-box,
    .frame-upload-section {
        flex: none;
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .frame-preview-container {
        padding: 32px 16px 24px 16px;
    }

    .frame-preview-container h3 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .floating-frame-btn {
        padding: 10px 12px 10px 16px;
        font-size: 13px;
        border-radius: 20px 0 0 20px;
    }

    .floating-frame-btn svg {
        width: 18px;
        height: 18px;
    }
}

.floating-frame-btn {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background-color: #222222;
    color: #ffffff;
    padding: 12px 16px 12px 20px;
    border-radius: 24px 0 0 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    z-index: 9999;
    box-shadow: -4px 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
}

.floating-frame-btn:hover,
.floating-frame-btn:focus {
    background-color: #000000;
    color: #ffffff;
    padding-right: 24px;
    text-decoration: none;
    outline: none;
}
