/* ==========================
   LINK CƠ BẢN
========================== */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Ẩn pseudo không cần thiết */
a:after {
    text-decoration: none;
}

/* ==========================
   BODY & NỀN
========================== */
body {
    background: #f4f5fb; /* nền sáng nhẹ, không quá chói */
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #111827;
}

/* ==========================
   NAVBAR
========================== */
.navbar-main {
    border-radius: 0;
    border: 0;
    margin-bottom: 24px;
    background: linear-gradient(90deg, #1f2937, #111827); /* gradient nhẹ */
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.35);
}

.navbar-main .navbar-brand.brand-main {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.navbar-main .navbar-brand .fa {
    margin-right: 6px;
}

.navbar-main .navbar-text,
.navbar-main .tagline-main {
    color: #d1d5db !important;
    font-size: 13px;
}

/* Giữ link trong navbar luôn trắng */
.navbar-main a,
.navbar-main a:hover {
    color: #ffffff !important;
    text-decoration: none;
}

/* ==========================
   KHỐI GHI CHÚ
========================== */
.note-wrapper {
    max-width: 960px;
    margin: 0 auto 40px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    padding: 20px 24px 18px;
}

/* Header phía trên textarea */
.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.note-link-info {
    max-width: 100%;
    margin-bottom: 8px;
}

.note-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.note-url-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.note-url {
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #eef2ff;          /* nền xanh nhạt */
    color: #1e293b;
    border: 1px solid #c7d2fe;    /* viền xanh nhạt */
    max-width: 100%;
    word-break: break-all;
}

/* Khu vực nút trên header */
.btn-note-header {
    font-size: 12px;
}

/* Khu vực nút Lưu + trạng thái */
.note-actions-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.save-status {
    font-size: 12px;
    color: #9ca3af;
}

.save-status-ok {
    color: #16a34a;
}

.save-status-error {
    color: #dc2626;
}

/* ==========================
   TEXTAREA
========================== */

/* Giữ style chung của bootstrap nhưng mềm hơn chút */
.form-control {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Riêng textarea */
textarea.form-control {
    height: 350px; /* fallback nếu không dùng .note-textarea */
}

.note-body {
    margin-top: 10px;
}

.note-textarea {
    min-height: 350px;
    height: 60vh;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 8px;
    border: 1px solid #cbd2e1;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.note-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* ==========================
   FOOTER GHI CHÚ
========================== */
.note-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.note-tip {
    font-size: 12px;
    color: #6b7280;
}

/* Ẩn phần printable dùng cho script.js */
#printable {
    display: none;
}

/* ==========================
   NÚT (DÙNG BOOTSTRAP SẴN,
   CHỈ TĂNG CẢM GIÁC "MỀM")
========================== */
.btn {
    border-radius: 999px; /* pill button nhẹ nhàng */
}

.btn-success {
    background-color: #22c55e;
    border-color: #16a34a;
}

.btn-success:hover {
    background-color: #16a34a;
    border-color: #15803d;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #1d4ed8;
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 768px) {
    .note-wrapper {
        margin: 0 6px 20px;
        padding: 15px;
        border-radius: 10px;
    }

    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .note-actions-top {
        margin-top: 4px;
    }

    .navbar-main .tagline-main {
        display: none;
    }
}
/* Dòng chứa link ghi chú + textbox */
.note-link-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    margin-bottom: 6px;
}

.note-label-inline {
    font-weight: 600;
    color: #374151;
}

/* Nhóm base URL + input */
.note-link-edit {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

/* Phần base url */
.note-base {
    font-size: 13px;
    color: #4b5563;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px 0 0 4px;
    border: 1px solid #d1d5db;
    border-right: none;
}

/* Ô nhập đuôi link */
.note-slug-input {
    height: 28px;
    border: 1px solid #d1d5db;
    border-radius: 0 4px 4px 0;
    padding: 0 8px;
    font-size: 13px;
    min-width: 80px;
    max-width: 180px;
}

/* Nút Lưu liên kết */
#btn-save-link {
    margin-left: 8px;
    font-size: 12px;
    padding: 3px 10px;
}


/* ==========================
   TOAST NOTIFICATION
========================== */
#toast-container {
  
}

.toast {
    min-width: 220px;
    padding: 12px 18px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(50px);
    animation: slideIn 0.3s forwards, fadeOut 0.4s ease 2.6s forwards;
    pointer-events: auto;
}

.toast.success { background: #16a34a; }
.toast.error   { background: #dc2626; }
.toast.info    { background: #2563eb; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}
