/* Основні стилі */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 700px;
    width: 100%;
    background-color: #fff;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
}

textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

button {
    flex-grow: 1;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#process-btn {
    background-color: #3498db;
    color: white;
}

#process-btn:hover {
    background-color: #2980b9;
}

#clear-btn {
    background-color: #e74c3c;
    color: white;
}

#clear-btn:hover {
    background-color: #c0392b;
}

button:active {
    transform: translateY(1px);
}

#contacts-list {
    margin-top: 20px;
}

.contact-item {
    background-color: #ecf0f1;
    padding: 15px;
    border-left: 5px solid #3498db;
    border-radius: 5px;
    margin-bottom: 10px;
}

.contact-item p {
    margin: 0;
    line-height: 1.6;
}

.contact-item .phone {
    font-weight: bold;
    color: #2c3e50;
}

.placeholder {
    color: #95a5a6;
    text-align: center;
    padding: 20px;
}

/* --- Оновлені та додані стилі для нових функцій --- */

/* Стилі для лічильників */
.counters-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 15px;
    margin-top: -10px;
    margin-bottom: 20px;
}

.counter-box {
    text-align: center;
    padding: 10px 15px;
    border-radius: 8px;
    background-color: #ecf0f1;
    flex-grow: 1;
}

.counter-box p {
    margin: 0;
    font-size: 0.9em;
    color: #555;
}

.counter-box .count {
    font-size: 2em;
    font-weight: bold;
}

.count.positive {
    color: #2ecc71;
}

.count.negative {
    color: #e74c3c;
}

/* Стилі для елементів контакту */
.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-item.positive {
    border-left-color: #27ae60;
    opacity: 0.9;
}

.contact-item.negative {
    border-left-color: #e74c3c;
    opacity: 0.9;
}

.status-date {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

/* Стилі для кнопок статусу */
.status-controls {
    display: flex;
    gap: 5px;
}

.status-btn {
    width: 35px;
    height: 35px;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
    background-color: #bdc3c7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-btn:hover {
    opacity: 0.8;
}

.status-btn:active {
    transform: translateY(1px);
}

.status-btn.positive {
    background-color: #2ecc71;
}

.status-btn.negative {
    background-color: #e74c3c;
}

.status-btn.reset {
    background-color: #95a5a6;
}

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

.status-btn svg {
    fill: white;
}

/* --- Новий стиль для фіксації блоку при прокрутці --- */
.sticky-counters {
    position: sticky;
    top: 20px; /* Відстань від верхнього краю вікна браузера */
    z-index: 10; /* Щоб блок був над іншими елементами */
    background-color: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
}