/* DevArise - Reusable Component Styles */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    min-height: 38px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    user-select: none;
    line-height: 1.25;
}

.btn:active {
    transform: scale(0.98) translateY(1px);
}

.btn:disabled, .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

/* Clear CTA Hierarchy: Primary = Blue/Brand, Secondary = Outlined/Surface, Tertiary/Ghost = Subtle Text */
.btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}
.btn-primary:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-navy);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--card-hover-border);
    color: var(--text-navy);
    transform: translateY(-1px);
}

.btn-navy {
    background: var(--btn-navy-bg);
    color: var(--btn-navy-text);
    border: 1px solid var(--btn-navy-border);
}
.btn-navy:hover {
    background: var(--btn-navy-hover);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.btn-light {
    background: var(--btn-light);
    color: var(--btn-light-text);
    border-color: transparent;
}
.btn-light:hover {
    background: rgba(59, 130, 246, 0.22);
    color: #bfdbfe;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
    border-color: var(--color-danger);
}
.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

.btn-ghost, .btn-text {
    background: transparent;
    color: var(--text-navy);
    border-color: transparent;
    padding: 6px 12px;
    min-height: 35px;
}
.btn-ghost:hover, .btn-text:hover {
    background: var(--surface-2);
    color: var(--accent-blue-hover);
}

.btn-icon {
    padding: 6px;
    width: 35px;
    height: 35px;
    min-height: 35px;
    min-width: 35px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    padding: 5px 13px;
    min-height: 35px;
    font-size: 0.835rem;
    border-radius: var(--radius-sm);
    line-height: 1.2;
}

.btn-lg {
    padding: 10px 24px;
    min-height: 44px;
    font-size: 0.95rem;
    border-radius: var(--radius);
}

.btn-full {
    width: 100%;
}

/* Action Buttons Group */
.action-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.badge-in-person {
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.28);
}

.badge-online {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.28);
}

.badge-workshop, .badge-track {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.28);
}

.badge-hackathon {
    background: var(--brand-accent);
    color: #ffffff;
    border-color: var(--brand-accent);
}

.badge-open, .badge-success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border-color: rgba(245, 158, 11, 0.25);
}

.badge-danger, .badge-full {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.25);
}

.badge-completed, .badge-neutral {
    background: var(--surface-2);
    color: var(--text-light);
    border-color: var(--line);
}

.tag-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.tag {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-mint-text);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-navy);
    margin-bottom: 6px;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.forgot-password-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-blue);
    transition: color 0.15s ease;
}

.forgot-password-link:hover {
    color: var(--accent-blue-hover);
    text-decoration: underline;
}

.form-label .required {
    color: var(--color-danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-navy);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 1;
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-control[readonly], .form-control:disabled {
    background: var(--surface-2);
    color: var(--text-light);
    cursor: not-allowed;
    border-color: var(--line);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    padding: 12px 14px;
}

.form-help {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 5px;
    line-height: 1.4;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-danger);
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.form-group.has-error .form-control, .form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-group.has-error .form-error {
    display: block;
}

.password-input-wrap {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 8px;
    min-height: 44px;
    min-width: 44px;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
}

.password-toggle-btn:hover {
    color: var(--text-navy);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}


/* Resilience for dynamic and long content */
.form-group,
.form-grid-2 > *,
.form-grid-3 > *,
.notice-item > *,
.modal-header > *,
.modal-footer > * {
    min-width: 0;
}

.form-help,
.form-error,
.empty-state-desc,
.error-state-desc,
.lightbox-caption {
    overflow-wrap: anywhere;
}

/* Tabs & Segmented Controls */
.tab-list, .segmented-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-2);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
    display: none;
}

.tab-btn, .tab-item {
    flex: 1;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn:hover, .tab-item:hover {
    color: var(--text-navy);
}

.tab-btn.active, .tab-item.active, .tab-btn[aria-selected="true"] {
    background: var(--surface);
    color: var(--text-navy);
    box-shadow: var(--shadow-xs);
}

/* Modals Primitive */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(9, 13, 22, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 16px;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    width: min(100%, 520px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.97) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 6px;
    min-height: 44px;
    min-width: 44px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--surface-2);
    color: var(--text-navy);
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--surface-2);
    flex-shrink: 0;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: #111827;
    color: #f8fafc;
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid var(--accent-blue);
    border: 1px solid var(--line);
    border-left-width: 4px;
}

.toast-success {
    border-left-color: var(--color-success);
}

.toast-error {
    border-left-color: var(--color-danger);
}

.toast-warning {
    border-left-color: var(--color-warning);
}

.toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    min-height: 40px;
    min-width: 40px;
}
.toast-close:hover {
    color: #ffffff;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Empty, Loading & Error States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1.5px dashed var(--line);
    margin: 16px 0;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.85;
    color: var(--accent-blue);
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-navy);
    margin-bottom: 6px;
}

.empty-state-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    max-width: 420px;
    margin: 0 auto 18px;
    line-height: 1.5;
}

.error-state {
    text-align: center;
    padding: 36px 20px;
    background: var(--color-danger-bg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--text-navy);
    margin: 16px 0;
}

.error-state-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-danger);
    margin-bottom: 6px;
}

.error-state-desc {
    font-size: 0.875rem;
    color: var(--text-body);
    margin-bottom: 16px;
}

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, rgba(255, 255, 255, 0.08) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-xs);
    display: block;
}

.skeleton-text {
    height: 0.95rem;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-title {
    height: 1.6rem;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-card {
    height: 200px;
    width: 100%;
    border-radius: var(--radius-lg);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb-item a {
    color: var(--text-light);
    transition: color 0.15s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-blue);
}

.breadcrumb-separator {
    color: var(--text-light);
    opacity: 0.6;
}

/* Responsive Table Utilities */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
    background: var(--surface);
}

.table th {
    background: var(--surface-2);
    color: var(--text-navy);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text-body);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--surface-2);
}

/* Card & Content Section Wrappers */
.card-bordered {
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xs);
}

.profile-card-max {
    max-width: 720px;
    margin: 0 auto;
}

.avatar-circle {
    border-radius: 50% !important;
    overflow: hidden !important;
    object-fit: cover !important;
}

/* Seat Capacity Progress Meter */
.seat-meter {
    margin: 12px 0;
}

.seat-meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-navy);
    margin-bottom: 6px;
}

.seat-meter-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.seat-meter-fill {
    height: 100%;
    background: var(--accent-mint);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.seat-meter-fill.warning {
    background: var(--color-warning);
}

.seat-meter-fill.danger {
    background: var(--color-danger);
}

/* Accessible Lightbox Viewer Components */
.lightbox-modal .modal-card {
    width: min(94vw, 840px);
    background: #0f172a;
    color: #ffffff;
}

.lightbox-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.lightbox-modal .modal-title {
    color: #ffffff;
}

.lightbox-modal .modal-close {
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.lightbox-modal .modal-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-wrap {
    width: 100%;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    margin-top: 6px;
}

.lightbox-caption {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
}

.lightbox-counter {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.lightbox-nav-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.lightbox-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Check-In Simulation & Add to Calendar */
.checkin-badge-card {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.checkin-qr-wrap {
    width: 120px;
    height: 120px;
    margin: 12px auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
}

.calendar-action-wrap {
    margin-top: 10px;
}

/* Notices List (Account Overview & Announcements) */
.notices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
}

.notice-item.no-border {
    border-bottom: none;
    padding-bottom: 0;
}

.notice-title {
    font-size: 0.925rem;
    color: var(--text-navy);
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Stepper & Dynamic Rows — see admin.css for canonical definitions */


/* Media fallback text inserted by the centralized image error handler. */
.image-fallback-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow-wrap: anywhere;
}
