/* ============================================================ */
/* MURAL DE MENSAGENS DOS CONVIDADOS - ESTILOS */
/* ============================================================ */

/* Seção do Mural */
.message-board-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.message-board-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.message-board-header {
    text-align: center;
    margin-bottom: 60px;
}

.message-board-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.message-board-title i {
    color: #667eea;
    font-size: 2.2rem;
}

.message-board-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid de Mensagens */
.messages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Card de Mensagem */
.message-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out backwards;
    position: relative;
    border: 2px solid #e2e8f0;
}

/* Cores Personalizadas baseadas em data-color */
.message-card[data-color="yellow"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.message-card[data-color="blue"] {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
}

.message-card[data-color="pink"] {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #f472b6;
}

.message-card[data-color="green"] {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #34d399;
}

.message-card[data-color="purple"] {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #818cf8;
}

.message-card[data-color="red"] {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #f87171;
}

.message-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.message-card:nth-child(1) {
    animation-delay: 0.1s;
}

.message-card:nth-child(2) {
    animation-delay: 0.2s;
}

.message-card:nth-child(3) {
    animation-delay: 0.3s;
}

.message-card:nth-child(4) {
    animation-delay: 0.4s;
}

.message-card:nth-child(5) {
    animation-delay: 0.5s;
}

.message-card:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.message-info {
    flex: 1;
}

.message-sender {
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 2px;
}

.message-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.message-text {
    color: #334155;
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
    word-wrap: break-word;
    position: relative;
    z-index: 1;
}

.message-icon {
    position: absolute;
    top: -16px;
    right: -16px;
    font-size: 40px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* Empty State */
.messages-empty {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.messages-empty i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.messages-empty h3 {
    font-size: 1.5rem;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 700;
}

.messages-empty p {
    color: #94a3b8;
    font-size: 1rem;
}

/* Badge no formulário de contato */
.message-board-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.message-board-badge i {
    font-size: 1rem;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Botão "Deixe uma mensagem" */
.btn-open-message-form {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-open-message-form:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(102, 126, 234, 0.5);
}

.btn-open-message-form i {
    font-size: 1.2rem;
}

/* ============================================================ */
/* MODAL DE GESTÃO (ADMIN) */
/* ============================================================ */

.message-admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.message-admin-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-admin-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.message-admin-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.message-admin-body {
    padding: 24px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* Toggle Switch */
.message-toggle-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-toggle-label {
    font-weight: 700;
    color: #0f172a;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.4s;
    border-radius: 32px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: #667eea;
}

input:checked+.toggle-slider:before {
    transform: translateX(28px);
}

/* Tabs */
.message-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
}

.message-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.message-tab:hover {
    color: #667eea;
}

.message-tab.active {
    color: #667eea;
}

.message-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.message-tab-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    font-weight: 700;
}

/* Lista de Mensagens (Admin) */
.admin-messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-message-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #cbd5e1;
}

.admin-message-item.pending {
    border-left-color: #f59e0b;
}

.admin-message-item.approved {
    border-left-color: #10b981;
}

.admin-message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-message-meta {
    flex: 1;
}

.admin-message-name {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.admin-message-email {
    font-size: 0.85rem;
    color: #64748b;
}

.admin-message-date {
    font-size: 0.85rem;
    color: #94a3b8;
}

.admin-message-text {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}

.admin-message-actions {
    display: flex;
    gap: 8px;
}

.admin-message-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.admin-message-btn.approve {
    background: #10b981;
    color: white;
}

.admin-message-btn.approve:hover {
    background: #059669;
}

.admin-message-btn.reject {
    background: #f59e0b;
    color: white;
}

.admin-message-btn.reject:hover {
    background: #d97706;
}

.admin-message-btn.delete {
    background: #ef4444;
    color: white;
}

.admin-message-btn.delete:hover {
    background: #dc2626;
}

.admin-message-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-messages-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.admin-messages-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .message-board-title {
        font-size: 2rem;
    }

    .messages-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Modal ocupa tela inteira no mobile */
    .message-admin-content {
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
    }

    /* Header menor no mobile */
    .message-admin-header {
        padding: 16px;
    }

    .message-admin-header h2 {
        font-size: 1.2rem;
        gap: 8px;
    }

    .message-admin-close {
        width: 32px;
        height: 32px;
    }

    /* Body com scroll adequado */
    .message-admin-body {
        padding: 16px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Toggle section empilhado */
    .message-toggle-section {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 16px;
    }

    /* Tabs responsivas */
    .message-tabs {
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .message-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .message-tab-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    /* Mensagens admin */
    .admin-message-item {
        padding: 12px;
    }

    .admin-message-header {
        flex-direction: column;
        gap: 8px;
    }

    .admin-message-meta {
        width: 100%;
    }

    /* Botões de ação empilhados */
    .admin-message-actions {
        flex-direction: column;
        width: 100%;
    }

    .admin-message-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Empty state */
    .admin-messages-empty {
        padding: 40px 16px;
    }

    .admin-messages-empty i {
        font-size: 2.5rem;
    }
}

/* Ajustes extras para telas muito pequenas */
@media (max-width: 480px) {
    .message-admin-header h2 {
        font-size: 1.1rem;
    }

    .message-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .admin-message-name {
        font-size: 0.95rem;
    }

    .admin-message-text {
        font-size: 0.9rem;
    }
}