@extends('layouts.master')

@section('title', 'Lawyer Roles - ')

@section('content')
<style>
:root{--sky:#0ea5e9;--sky-deep:#0369a1;--sky-ghost:rgba(14,165,233,.07);--sky-border:rgba(14,165,233,.2);--ink-mid:#3f4a5a;--white:#fff;--off:#f7fbff;--surface:#eef6fd;--border:#daeaf8;--danger:#ef4444;--danger-bg:rgba(239,68,68,.08);--danger-border:rgba(239,68,68,.2);--amber:#f59e0b;--amber-bg:rgba(245,158,11,.08);--amber-border:rgba(245,158,11,.22);--fd:'Cormorant Garamond',Georgia,serif;--fb:'DM Sans',system-ui,sans-serif;--fm:'DM Mono',monospace}
.main-content{background:var(--off);font-family:var(--fb)}
.main-content .container,.main-content .tx-page,.main-content .page-wrap,.main-content .content-wrapper,.main-content .wrap{background:var(--white);border:1px solid var(--border);border-radius:16px;box-shadow:0 8px 24px rgba(14,165,233,.1)}
.main-content h1,.main-content h2,.main-content h3{font-family:var(--fd);color:var(--sky-deep)}
.main-content .btn,.main-content .back-btn,.main-content .option-btn,.main-content .submit-btn,.main-content .refresh-btn,.main-content .action-btn,.main-content .act-btn,.main-content .link{border-radius:10px!important;font-family:var(--fb)!important;font-weight:600!important}
.main-content .btn-secondary,.main-content .back-btn,.main-content .refresh-btn,.main-content .btn-muted,.main-content .btn-ghost{background:#fff!important;color:var(--ink-mid)!important;border:1px solid var(--sky-border)!important}
.main-content .btn-primary,.main-content .option-btn,.main-content .submit-btn{background:linear-gradient(135deg,var(--sky-deep),var(--sky))!important;color:#fff!important;border:1px solid var(--sky-deep)!important}
.main-content table,.main-content .table{border-color:var(--border)!important}
.main-content thead,.main-content thead tr,.main-content th,.main-content .table thead th,.main-content .table-head-row{background:var(--surface)!important;color:var(--ink-mid)!important;border-color:var(--border)!important}
.main-content tbody tr:hover,.main-content .tx-row:hover{background:var(--sky-ghost)!important}
.main-content input,.main-content select,.main-content textarea{border:1px solid var(--border)!important;border-radius:10px!important;font-family:var(--fb)!important}
.main-content input:focus,.main-content select:focus,.main-content textarea:focus{border-color:var(--sky)!important;box-shadow:0 0 0 3px rgba(14,165,233,.12)!important}
.main-content .rate-badge,.main-content .badge,.main-content .status-badge{font-family:var(--fm)}
.main-content .actions,.main-content .cell-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.main-content a[href*='/edit'],.main-content .act-edit,.main-content .btn-warning{background:var(--amber-bg)!important;color:#92400e!important;border:1px solid var(--amber-border)!important}
.main-content .act-delete,.main-content form button[type='submit'].btn-danger,.main-content form button[onclick*='delete']{background:var(--danger-bg)!important;color:#991b1b!important;border:1px solid var(--danger-border)!important}
.main-content a[href*='/show'],.main-content .act-view{background:var(--sky-ghost)!important;color:var(--sky-deep)!important;border:1px solid var(--sky-border)!important}
</style>
<style>
    .container {
        max-width: 600px;
        margin: 40px auto;
        background-color: #f0f9ff; /* light blue */
        padding: 20px 30px 30px;
        border-radius: 10px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        animation: fadeInUp 0.6s ease forwards;
        opacity: 0;
        transform: translateY(20px);
    }

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

    h1 {
        text-align: center;
        color: #1e40af; /* blue-900 */
        margin-bottom: 25px;
        user-select: none;
    }

    #searchInput {
        width: 100%;
        padding: 10px 15px;
        font-size: 1em;
        border: 2px solid #3b82f6; /* blue-500 */
        border-radius: 8px;
        margin-bottom: 25px;
        transition: border-color 0.3s ease;
    }
    #searchInput:focus {
        outline: none;
        border-color: #2563eb; /* blue-600 */
        box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
    }

    .option-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .option-item {
        background-color: #3b82f6; /* blue-500 */
        color: white;
        padding: 15px 20px;
        border-radius: 8px;
        font-size: 1.2em;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        position: relative;
        overflow: hidden;
        cursor: pointer;
        user-select: none;
        transition:
            background-color 0.3s ease,
            transform 0.2s ease,
            box-shadow 0.3s ease;
        box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
    }

    .option-item:hover,
    .option-item:focus-visible {
        background-color: #2563eb; /* blue-600 */
        transform: scale(1.05);
        box-shadow: 0 8px 15px rgba(37, 99, 235, 0.6);
        outline: none;
        z-index: 1;
    }

    /* Ripple effect container */
    .option-item .ripple {
        position: absolute;
        border-radius: 50%;
        transform: scale(0);
        animation: ripple 600ms linear;
        background-color: rgba(255, 255, 255, 0.7);
        pointer-events: none;
        z-index: 2;
    }

    @keyframes ripple {
        to {
            transform: scale(4);
            opacity: 0;
        }
    }
</style>

<div class="container" role="main" aria-label="Lawyer Roles">
    <h1>Lawyer Roles</h1>

    <input
        type="search"
        id="searchInput"
        placeholder="Search options..."
        aria-label="Search Lawyer Roles options"
        autocomplete="off"
    />

    <div class="option-list" role="list" id="optionList">
        <a href="{{ route('modules.edit.lawyer-roles.add') }}" class="option-item" role="listitem" tabindex="0">
            Add Roles
        </a>
        <a href="{{ route('modules.edit.lawyer-roles.view') }}" class="option-item" role="listitem" tabindex="0">
            View Roles
        </a>
    </div>
</div>

<script>
    // Ripple effect on click
    document.querySelectorAll('.option-item').forEach(item => {
        item.addEventListener('click', function (e) {
            const ripple = document.createElement('span');
            ripple.classList.add('ripple');
            this.appendChild(ripple);

            const rect = this.getBoundingClientRect();
            const size = Math.max(rect.width, rect.height);
            ripple.style.width = ripple.style.height = size + 'px';

            const x = e.clientX - rect.left - size / 2;
            const y = e.clientY - rect.top - size / 2;
            ripple.style.left = x + 'px';
            ripple.style.top = y + 'px';

            ripple.addEventListener('animationend', () => {
                ripple.remove();
            });
        });
    });

    // Search/filter functionality
    const searchInput = document.getElementById('searchInput');
    const optionList = document.getElementById('optionList');
    const options = optionList.querySelectorAll('.option-item');

    searchInput.addEventListener('input', () => {
        const query = searchInput.value.toLowerCase().trim();
        options.forEach(option => {
            const text = option.textContent.toLowerCase();
            option.style.display = text.includes(query) ? '' : 'none';
        });
    });
</script>
@endsection


