/**
 * Posting Completion Modal Styles
 * Platform-specific posting guidance with RiQ avatar
 */

/* Modal Overlay */
.posting-completion-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    backdrop-filter: blur(0px);
    opacity: 0;
    transition: all 0.3s ease;
}

.posting-completion-modal-overlay.show {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 1;
}

/* Modal Container */
.posting-completion-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.posting-completion-modal-overlay.show .posting-completion-modal {
    transform: scale(1) translateY(0);
}

/* Header */
.posting-modal-header {
    background: linear-gradient(135deg, #9a4054 0%, #c4576a 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.posting-modal-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.posting-modal-branding .codeiq-logo {
    height: 32px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.posting-modal-header .modal-title {
    font-size: 20px;
    font-weight: 600;
}

.posting-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.posting-modal-close:hover {
    transform: scale(1.2);
}

/* RiQ Avatar */
.posting-modal-avatar {
    display: flex;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #c4576a 0%, white 100%);
}

.posting-modal-avatar img {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    animation: gentleBounce 3s infinite ease-in-out;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Content */
.posting-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 28px;
}

/* Completion Summary */
.completion-summary {
    text-align: center;
    margin-bottom: 32px;
}

.summary-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

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

.completion-summary h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.summary-message {
    font-size: 16px;
    color: #6b6b6b;
    margin: 0 0 20px 0;
}

/* Summary Stats */
.summary-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    min-width: 80px;
}

.stat-item.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
}

.stat-item.failed {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
}

.stat-item.total {
    background: linear-gradient(135deg, #fae8ec 0%, #e9d5ff 100%);
    border: 1px solid #d8b4fe;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Guidance Section */
.guidance-section {
    background: linear-gradient(135deg, #fdf5f7 0%, #fae8ec 100%);
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.guidance-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.guidance-steps {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.guidance-steps li {
    font-size: 15px;
    color: #6b6b6b;
    margin-bottom: 10px;
    line-height: 1.6;
}

.guidance-steps strong {
    color: #1a1a1a;
    font-weight: 600;
}

.guidance-note {
    background: white;
    border-left: 4px solid #a855f7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #6b6b6b;
    margin: 0;
    line-height: 1.6;
}

.guidance-note strong {
    color: #1a1a1a;
    font-weight: 600;
}

.guidance-note em {
    font-style: italic;
    color: #a855f7;
}

/* Failed Section */
.failed-section {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.failed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.failed-icon {
    font-size: 32px;
}

.failed-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
    margin: 0;
}

.failed-message {
    font-size: 15px;
    color: #6b6b6b;
    margin: 0 0 12px 0;
}

.failed-reasons {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.failed-reasons li {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 8px;
}

.failed-action {
    background: white;
    border-left: 4px solid #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #6b6b6b;
    margin: 0;
    line-height: 1.6;
}

.failed-action strong {
    color: #dc2626;
    font-weight: 600;
}

/* Features Section */
.features-section {
    margin-bottom: 24px;
}

.features-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.feature-list {
    margin: 0;
    padding-left: 24px;
}

.feature-list li {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #d4d0c8;
}

.btn-secondary {
    padding: 12px 32px;
    background: linear-gradient(135deg, #9a4054 0%, #9a4054 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(154, 64, 84, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #9a4054 0%, #c4576a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 87, 106, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .posting-completion-modal {
        width: 95%;
        max-width: 95%;
    }

    .posting-modal-content {
        padding: 24px 20px;
    }

    .completion-summary h3 {
        font-size: 20px;
    }

    .summary-icon {
        font-size: 40px;
    }

    .posting-modal-avatar img {
        width: 70px;
        height: 70px;
    }

    .guidance-section,
    .failed-section {
        padding: 16px;
    }

    .summary-stats {
        flex-wrap: wrap;
    }

    .stat-item {
        min-width: 70px;
        padding: 10px 16px;
    }

    .stat-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .posting-modal-header {
        padding: 16px 18px;
    }

    .posting-modal-branding .codeiq-logo {
        height: 28px;
    }

    .posting-modal-header .modal-title {
        font-size: 18px;
    }

    .posting-modal-avatar {
        padding: 20px;
    }

    .posting-modal-avatar img {
        width: 60px;
        height: 60px;
    }

    .posting-modal-content {
        padding: 20px 16px;
    }

    .guidance-steps,
    .failed-reasons,
    .feature-list {
        padding-left: 20px;
    }
}
