/**
 * Admin List Styling
 * Generic card-based design for list management views
 * Can be used for categories, users, items, etc.
 */

/* Admin Navigation - Modern Horizontal Menu */
.admin-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0 0 30px 0;
    padding: 8px;
    overflow: hidden;
}

.admin-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.admin-nav-list li {
    position: relative;
}

.admin-nav-list li.nav-logout {
    margin-left: auto;
}

.admin-nav-list .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.admin-nav-list .nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #1d1d1f;
    transform: scale(1.02);
}

.admin-nav-list .nav-link:hover::before {
    width: 80%;
}

.admin-nav-list .nav-link.logout {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.admin-nav-list .nav-link.logout:hover {
    background: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

.admin-nav-list .nav-icon {
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.admin-nav-list .nav-text {
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Active state indicator */
.admin-nav-list .nav-link.active {
    background: rgba(0, 122, 255, 0.2);
    color: #007aff;
    border: 1px solid rgba(0, 122, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Responsive navigation */
@media (max-width: 968px) {
    .admin-nav-list {
        flex-wrap: wrap;
    }

    .admin-nav-list .nav-link {
        padding: 14px 18px;
        font-size: 13px;
    }

    .admin-nav-list .nav-icon {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .admin-nav {
        border-radius: 8px;
    }

    .admin-nav-list {
        flex-direction: column;
    }

    .admin-nav-list li {
        width: 100%;
    }

    .admin-nav-list li.nav-logout {
        margin-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .admin-nav-list .nav-link {
        justify-content: flex-start;
        padding: 16px 20px;
    }

    .admin-nav-list .nav-link::before {
        left: 0;
        transform: translateX(0);
        height: 100%;
        width: 0;
    }

    .admin-nav-list .nav-link:hover::before {
        width: 4px;
    }
}

.admin-list-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.admin-list-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-list-container ul li {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.admin-list-container ul li:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
}

.list-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.list-item-title {
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
}

.list-item-title:hover {
    color: #007aff;
}

.list-item-badge {
    color: #1d1d1f;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.list-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.list-item-actions a {
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.list-item-actions a {
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}

.list-item-actions .btn-edit {
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
}

.list-item-actions .btn-edit:hover {
    background: rgba(0, 122, 255, 0.2);
    text-decoration: underline;
}

.list-item-actions .btn-delete {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.list-item-actions .btn-delete:hover {
    background: rgba(255, 59, 48, 0.2);
    text-decoration: underline;
}

.list-item-actions .btn-view {
    color: #34c759;
    background: rgba(52, 199, 89, 0.1);
}

.list-item-actions .btn-view:hover {
    background: rgba(52, 199, 89, 0.2);
    text-decoration: underline;
}

.list-item-actions .btn-primary {
    color: #5ac8fa;
    background: rgba(90, 200, 250, 0.1);
}

.list-item-actions .btn-primary:hover {
    background: rgba(90, 200, 250, 0.2);
    text-decoration: underline;
}

.list-item-actions .btn-deactivate {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.list-item-actions .btn-deactivate:hover {
    background: rgba(255, 59, 48, 0.2);
    text-decoration: underline;
}

.list-item-actions .btn-activate {
    color: #34c759;
    background: rgba(52, 199, 89, 0.1);
}

.list-item-actions .btn-activate:hover {
    background: rgba(52, 199, 89, 0.2);
    text-decoration: underline;
}

.admin-list-container .btn-add {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #007aff;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
    border: none;
}

.admin-list-container .btn-add:hover {
    background: #0056cc;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
    transform: translateY(-1px);
}

.info-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(52, 199, 89, 0.15);
    border: 1px solid rgba(52, 199, 89, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.info-message.error {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.info-message.warning {
    background: rgba(255, 204, 0, 0.15);
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.page-heading {
    color: #1d1d1f;
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 700;
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    margin: auto;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 20px 24px;
    background: rgba(242, 242, 247, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(198, 198, 200, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: #86868b;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #1d1d1f;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Success and error messages in modal */
.modal-body .success-message,
.modal-body .error-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.modal-body .success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.modal-body .error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form styling in modal */
.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body form p {
    margin: 0;
}

.modal-body form input[type="text"],
.modal-body form input[type="email"],
.modal-body form textarea,
.modal-body form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(198, 198, 200, 0.5);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-body form input[type="text"]:focus,
.modal-body form input[type="email"]:focus,
.modal-body form textarea:focus,
.modal-body form select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.modal-body form input[type="submit"],
.modal-body form button[type="submit"] {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.9), rgba(10, 132, 255, 0.8));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-body form input[type="submit"]:hover,
.modal-body form button[type="submit"]:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 1), rgba(10, 132, 255, 0.9));
    box-shadow: 0 6px 25px rgba(0, 122, 255, 0.4);
    transform: translateY(-2px);
}

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

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }
}

/* Amendments List Styles */
.amendments-list {
    max-height: 500px;
    overflow-y: auto;
}

.amendments-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.amendments-list li {
    padding: 16px;
    border-bottom: 1px solid rgba(198, 198, 200, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 8px;
    border-radius: 12px;
}

.amendments-list li:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.amendments-list li:last-child {
    border-bottom: none;
}

.amendment-title-wrapper {
    margin-bottom: 8px;
}

.amendment-link {
    color: #007aff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.amendment-link:hover {
    color: #0056cc;
}

.amendment-link svg {
    flex-shrink: 0;
}

.amendment-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #86868b;
    flex-wrap: wrap;
}

.amendment-meta span {
    display: inline-block;
}

.amendment-meta strong {
    font-weight: 600;
}

.amendments-empty {
    text-align: center;
    padding: 40px;
    color: #86868b;
}

.amendments-empty p {
    margin: 0;
    font-size: 16px;
}

/* Responsive amendments list */
@media (max-width: 768px) {
    .amendments-list {
        max-height: 400px;
    }

    .amendments-list li {
        padding: 12px;
    }

    .amendment-link {
        font-size: 15px;
    }

    .amendment-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
}

/* Links section styling */
.amendment-links {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.amendment-links.full-width {
    width: 100%;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 12px;
    background: rgba(39, 174, 96, 0.02);
    border-top: 1px solid rgba(39, 174, 96, 0.1);
}

.amendment-links strong {
    display: block;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.links-list li {
    padding: 0;
    border: none;
    background: none;
    margin: 0;
}

.link-item-wrapper {
    width: 100%;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #34c759;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: rgba(52,199,89,0.05);
    border: 1px solid rgba(52,199,89,0.1);
    width: 100%;
}

.link-item:hover {
    color: #28a745;
    background: rgba(52,199,89,0.1);
    border-color: rgba(52,199,89,0.2);
}

.link-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.link-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.link-type {
    font-size: 12px;
    color: #1d1d1f;
    background: #e5e5ea;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Responsive links */
@media (max-width: 768px) {
    .amendment-links {
        margin-top: 10px;
        padding-top: 10px;
    }

    .link-item {
        font-size: 13px;
        padding: 3px 6px;
    }

    .link-type {
        font-size: 11px;
        padding: 1px 4px;
    }
}
