/*
 * Стили формы обратной связи
 * Дизайн: пыльно-розовая палитра, стеклянная карточка, тени, анимации
 * Адаптивная вёрстка (CSS3 + Flexbox)
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(150deg, #f5e1e8 0%, #e8c5d2 40%, #d8a7b9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px;
    color: #2d2b3a;
    line-height: 1.6;
}

.container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(180, 120, 140, 0.25),
        0 8px 20px rgba(180, 120, 140, 0.1);
    padding: 48px 44px;
    max-width: 720px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    color: #2d2b3a;
    letter-spacing: -0.5px;
}

h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #d8a7b9, #b88aa0);
    border-radius: 2px;
    margin: 12px auto 0;
}

.subtitle {
    text-align: center;
    color: #8a7a88;
    font-size: 15px;
    margin-bottom: 36px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #2d2b3a;
    display: flex;
    align-items: center;
    gap: 8px;
}

h2::before {
    content: '💬';
    font-size: 20px;
}

.feedback-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a3f4a;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8dce4;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    color: #2d2b3a;
}

input[type="text"]:hover,
input[type="tel"]:hover,
input[type="email"]:hover,
textarea:hover {
    background: rgba(255, 255, 255, 0.9);
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #d8a7b9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(216, 167, 185, 0.15);
}

textarea {
    resize: vertical;
    min-height: 130px;
}

.error {
    display: block;
    color: #d45a6a;
    font-size: 13px;
    margin-top: 6px;
    padding-left: 4px;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #d8a7b9 0%, #c28ea4 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #c28ea4 0%, #b07a92 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.98);
}

.btn span,
.btn svg {
    position: relative;
    z-index: 1;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    padding: 14px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 500;
    border: 1px solid rgba(46, 125, 50, 0.15);
    animation: fadeIn 0.4s ease-out;
}

.hidden {
    display: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0 32px;
    color: #b8a8b4;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0d4dc, transparent);
}

#messages-list {
    min-height: 60px;
}

.empty {
    text-align: center;
    color: #b8a8b4;
    padding: 40px 20px;
    font-size: 15px;
    background: rgba(216, 167, 185, 0.06);
    border-radius: 16px;
    border: 1px dashed #e0d4dc;
}

.message {
    background: linear-gradient(135deg, #faf5f7, #fdfafb);
    border: 1px solid #f0e6ec;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

.message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(180, 120, 140, 0.12);
    border-color: #e0d0da;
}

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

.message-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d8a7b9, #c28ea4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.message-header strong {
    font-size: 15px;
    color: #2d2b3a;
    font-weight: 600;
}

.date {
    font-size: 12px;
    color: #b8a8b4;
    white-space: nowrap;
}

.message-phone {
    font-size: 13px;
    color: #b88aa0;
    margin-bottom: 4px;
    padding-left: 52px;
}

.message-email {
    font-size: 13px;
    color: #c28ea4;
    margin-bottom: 10px;
    padding-left: 52px;
}

.message-body {
    font-size: 15px;
    line-height: 1.7;
    color: #4a3f4a;
    padding-left: 52px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
    body {
        padding: 20px 12px;
    }

    .container {
        padding: 28px 20px;
        border-radius: 18px;
    }

    h1 {
        font-size: 24px;
    }

    .message {
        padding: 16px;
    }

    /* На мобильных убираем отступ для выравнивания с аватаром */
    .message-phone,
    .message-email,
    .message-body {
        padding-left: 0;
    }

    .message-header {
        flex-wrap: wrap;
    }
}
