/* ========================================================================
   Sidedock Component
   Right-side sliding panel for forms and details
   ======================================================================== */

.sidedock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidedock-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidedock {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidedock.active {
    right: 0;
}

.sidedock__header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.sidedock__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.sidedock__close {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.sidedock__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sidedock__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.sidedock__footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #f8fafc;
}

/* Form within sidedock */
.sidedock-form .form-group {
    margin-bottom: 1.25rem;
}

.sidedock-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.sidedock-form input[type="text"],
.sidedock-form input[type="email"],
.sidedock-form input[type="date"],
.sidedock-form input[type="number"],
.sidedock-form select,
.sidedock-form textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.sidedock-form input:focus,
.sidedock-form select:focus,
.sidedock-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sidedock-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Loading state */
.sidedock.loading .sidedock__body {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .sidedock {
        width: 100vw;
        right: -100vw;
    }
}
