/**
 * Poster Promotion UI Styles
 *
 * @package Batumi_Theme
 */

/* Promotion Badge on Listing Cards */
.promo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.promo-badge.promo-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    animation: promotionPulse 2s ease-in-out infinite;
}

.promo-badge.promo-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.promo-badge.promo-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes promotionPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
    }
}

/* Promoted Listing Card */
.listing-card.listing-promoted {
    border: 2px solid #667eea;
    background: linear-gradient(to bottom, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.listing-card.listing-promoted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Promotion Modal */
.promotion-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease-in;
}

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

.promotion-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

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

.promotion-modal-close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.promotion-modal-close:hover,
.promotion-modal-close:focus {
    color: #333;
}

.promotion-modal-title {
    margin-top: 0;
    font-size: 26px;
    line-height: 1.3;
    color: #333;
}

.promotion-modal-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
}

/* Promotion Packages Grid */
.promotion-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.promotion-package {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.promotion-package:hover {
    border-color: #667eea;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px);
}

.package-header {
    margin-bottom: 15px;
}

.package-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.package-price {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 12px;
}

.package-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.package-duration,
.package-priority {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.package-description {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    margin-bottom: 15px;
}

.promotion-package .btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.promotion-package .btn-primary {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.promotion-package .btn-primary:hover {
    background: #5568d3;
    border-color: #5568d3;
    transform: scale(1.02);
}

/* Modal Actions */
.promotion-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.promotion-modal-actions .btn {
    padding: 10px 24px;
}

/* Modal Loading State */
.promotion-modal-loading {
    text-align: center;
    padding: 40px 20px;
}

.promotion-modal-loading .spinner {
    font-size: 32px;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.promotion-modal-loading p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Dashboard Messages Enhancement */
.dashboard-messages .message {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    animation: slideDown 0.3s ease-out;
}

.dashboard-messages .message-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.dashboard-messages .message-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .promotion-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .promotion-modal-title {
        font-size: 22px;
    }

    .promotion-packages-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .promotion-modal-actions {
        flex-direction: column-reverse;
    }

    .promotion-modal-actions .btn {
        width: 100%;
    }

    .promo-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

@media screen and (max-width: 480px) {
    .promotion-modal-content {
        margin: 5% auto;
        padding: 15px;
    }

    .package-price {
        font-size: 20px;
    }

    .package-name {
        font-size: 18px;
    }
}

/* Button Utilities for Promotion */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Listing Card Positioning Context */
.listing-card {
    position: relative;
}
