body {
    font-family: Arial, sans-serif;
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.hidden {
    display: none;
}

.block-wrapper {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.block-wrapper {
    margin-top:30px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

textarea {
    min-height: 100px;
}

input[type="checkbox"] {
    margin-right: 10px;
}

input[type="text"]._error,
input[type="datetime-local"]._error,
input[type="number"]._error,
select._error,
textarea._error {
    border-color: #ff0000;
}

.error-message {
    color: #ff0000;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

input[type="submit"] {
    background-color: #474EFF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

input[type="submit"]:hover {
    background-color: #3C3597;
}

input[type="submit"]:disabled {
    background-color: #cccccc;
    color: #fff;
    cursor: initial;
}

.event-list__item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.event-list__item:last-child {
    border-bottom: none;
}

.event-content {
    flex-grow: 1;
}

.event-list__item .event-list__item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.event-list__item .event-list__item-title span {
    text-decoration: underline;
    color: #3C3597;
    cursor: pointer;
}

.event-list__item .event-list__item-description {
    color: #666;
    line-height: 1.4;
}

.event-list__item .event-action-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
    margin-top:-10px;
    max-height: 30px;
}

.event-list__item .event-action-btn.remove {
    background-color: #f44336;
}

.event-action-btn:hover {
    opacity: 0.8;
}

.pagination-info {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    background-color: #fff;
    border: 1px solid #474EFF;
    color: #474EFF;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background-color: #474EFF;
    color: white;
}

.pagination button:hover {
    background-color: #322c7d;
    border: 1px solid #322c7d;
    color: white;
}

.pagination button:disabled {
    background-color: #ddd;
    border-color: #ddd;
    color: #666;
    cursor: not-allowed;
}

.nav-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.no-events {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 16px;
}

.proceed-btn {
    display: block;
    width: 100%;
    background-color: #3C3597;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.proceed-btn:hover {
    background-color: #322c7d;
}

.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #3C3597;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f5f5f5;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-button {
    background-color: #3C3597;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
}

.action-button:hover {
    background-color: #322c7d;
}

.selection-info {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.selection-info p {
    margin: 5px 0;
    color: #333;
}

.selection-info p.short {
    max-height: 110px;
    overflow: hidden;
}

.selection-info a {
    text-decoration: none;
    color: #3C3597;
    font-weight: 600;
    display: flex;
    margin-top:10px;
}

.submit-button {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.submit-button:hover {
    background-color: #45a049;
}

.button-group-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.popup-buttons_wrapper {
    display: flex;
}

.return-button,
.next-button {
    flex: 1;
    background-color: white;
    color: black;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top:20px;
}

.return-button:hover {
    background-color: #f5f5f5;
}

.next-button {
    background-color: #3C3597;
    color: white;
}

.submit-button-footer {
    flex: 1;
    background-color: #3C3597;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top:20px;
}

.submit-button-footer:hover,
.next-button:hover {
    background-color: #322c7d;
}

.form-subblock {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.form-subblock h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-subblock .form-group {
    margin-bottom: 15px;
}

.form-subblock .form-group:last-child {
    margin-bottom: 0;
}

.form-subblock label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.form-subblock input[type="checkbox"] {
    margin-right: 8px;
}

@media (max-width: 480px) {
    .form-subblock {
        padding: 15px;
    }

    input[type="date"] {
        font-size: 14px;
    }
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    display: none;
}
.popup-content.open {
    display: block;
}

.popup-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.popup-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #3C3597;
}

.popup-info p {
    margin: 10px 0;
    line-height: 1.4;
}

.popup-info strong {
    color: #333;
}

.show-more-btn {
    width: 100%;
    background-color: #474EFF;
    border: 1px solid #474EFF;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    margin: 20px 0;
    transition: background-color 0.3s;
}

.show-more-btn:hover {
    background-color: #3C3597;
}

.alert-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: white;
    padding: 15px 30px;
    border-radius: 4px;
    z-index: 2000;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.alert-notification .alert-message {
    line-height: 22px;
}

.alert-close {
    color: white;
    font-weight: bold;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 10px;
}

.alert-close:hover {
    opacity: 0.8;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        margin: 10px;
    }

    .form-container, .events-container {
        padding: 15px;
    }

    h2 {
        font-size: 20px;
    }

    .event-title {
        font-size: 16px;
    }
}

@media screen and (max-width: 600px) {
    .form-container, .events-container {
        margin: 10px 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    input[type="text"],
    input[type="number"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 14px;
    }
    .pagination button {
        min-width: 36px;
        min-height: 36px;
        padding: 3px 6px;
    }
}