/**
 * BirthdayCard.online
 * Card Preview Styles
 */

/* Card Preview Styles */
.card-preview-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.preview-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.preview-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.preview-text-content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 30px;
    border-radius: 10px;
    max-width: 80%;
    text-align: center;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.preview-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: inherit;
}

.preview-message {
    font-size: 1.2em;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: inherit;
}

.preview-sender {
    margin-top: 20px;
    font-style: italic;
    text-align: right;
    color: inherit;
}

/* Position classes */
.position-top {
    align-items: flex-start;
    padding-top: 40px;
}

.position-middle {
    align-items: center;
}

.position-bottom {
    align-items: flex-end;
    padding-bottom: 40px;
}

/* Final preview section */
.final-preview {
    margin: 40px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.final-preview .card-preview-container {
    min-height: 500px;
}

/* Theme styles */
.theme-blue { --theme-color: #0d6efd; --theme-text-color: #ffffff; --theme-accent-color: #0a58ca; }
.theme-red { --theme-color: #dc3545; --theme-text-color: #ffffff; --theme-accent-color: #c82333; }
.theme-green { --theme-color: #198754; --theme-text-color: #ffffff; --theme-accent-color: #157347; }
.theme-yellow { --theme-color: #ffc107; --theme-text-color: #212529; --theme-accent-color: #e0a800; }
.theme-purple { --theme-color: #6f42c1; --theme-text-color: #ffffff; --theme-accent-color: #5e37a6; }
.theme-pink { --theme-color: #d63384; --theme-text-color: #ffffff; --theme-accent-color: #c5297b; }
.theme-teal { --theme-color: #20c997; --theme-text-color: #ffffff; --theme-accent-color: #1ba87e; }
.theme-indigo { --theme-color: #6610f2; --theme-text-color: #ffffff; --theme-accent-color: #560bd0; }
.theme-orange { --theme-color: #fd7e14; --theme-text-color: #ffffff; --theme-accent-color: #e96b02; }
.theme-gray { --theme-color: #6c757d; --theme-text-color: #ffffff; --theme-accent-color: #5a6268; }

/* Preview specific overrides */
.card-preview {
    min-height: 400px;
    background-color: var(--theme-color, #ffffff);
}

.preview-text-content {
    transition: all 0.3s ease;
}

/* Make sure images display properly */
.preview-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Preview decorations */
.preview-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.decoration {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: decorationPulse 2s infinite alternate ease-in-out;
}

.decoration.top-left {
    top: 15px;
    left: 15px;
}

.decoration.top-right {
    top: 15px;
    right: 15px;
}

.decoration.bottom-left {
    bottom: 15px;
    left: 15px;
}

.decoration.bottom-right {
    bottom: 15px;
    right: 15px;
}

@keyframes decorationPulse {
    from {
        transform: scale(1);
        opacity: 0.7;
    }
    to {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Preview effects */
.effect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Thumbnail preview */
.card-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.preview-bg-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-overlay-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.4);
}

.preview-content-thumb {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    max-width: 80%;
    text-align: center;
}

/* Final preview modal */
.preview-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.preview-bg-modal {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.preview-overlay-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content-modal {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 8px;
    max-width: 80%;
    text-align: center;
}

/* Preview animations */
.animate-fade {
    animation: fadeIn 1s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease-out;
}

.animate-slide {
    animation: slideIn 1s ease-out;
}

.animate-zoom {
    animation: zoomIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Media preview containers */
.media-preview-container {
    margin-top: 20px;
}

.preview-youtube,
.preview-spotify {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-youtube iframe,
.preview-spotify iframe {
    width: 100%;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .preview-container {
        height: 300px;
    }
    
    .preview-content {
        max-width: 90%;
        padding: 15px;
    }
    
    .card-thumbnail {
        height: 180px;
    }
} 