/* Cards/Panels */
.card {
    background: #fff;
    /*border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;*/
    overflow: hidden;
}

.card-header {
    background: #DDDDDD;/*f8f9fa;*/
    border-bottom: 1px solid #CCCCCC;/*dee2e6;*/
    padding: 15px;
    font-weight: 300;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.card-header-title {
    flex: 1;
}

.card-header-main {
    font-weight: 400;
    font-size: 1.1em;
} 
/* Card action buttons - mirrors .issue-controls */
.card-controls {
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	width: 100%;
	gap: 6px;
	align-items: center;
	flex-wrap: wrap;
}

/* Project record tab heading + project name */
.tab-title-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
    padding-bottom: 20px;
}

.tab-title-bar h2 {
    margin-bottom: 0;
}

.tab-title-bar p {
    color: #999999;
    font-style: italic;
    font-weight: 100;
}

.card-body {
    padding: 25px;
}

.overflow-scroll {
    overflow-x: auto;
}

a.subgroup-card {
    text-decoration: none;
}

/* Resource Headshot */
.resource-title {
    padding-right: 10px;
}
.resource-headshot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
    border: 2px solid #dee2e6;
}

.active-check {
    color: #28a745;
    font-size: 1.43em;
    font-weight: 400; 
    margin-left: auto;
    margin-right: 8px;
    line-height: 1;
}

.resource-headshot-container {
    position: relative;
    width: 100px;
    margin-bottom: 10px;
}

.resource-headshot-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
    display: block;
}

.delete-headshot-btn {
    position: absolute;
    top: -5px;
    right: -15px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty Card */
.empty-card {
    text-align: center;
    padding: 3rem 1rem;
    margin: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}

.empty-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 400;
    color: #374151;
}

.empty-card p {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.org-contact-bar {
    background: #fff;
    padding: 8px 10px;
    font-size: 1em;
    color: #666;
    border-bottom: 1px solid #dee2e6;
    text-align: right;
}

/* Buttons */
button,
button:hover {
    background-color: none !important;
    border: none !important;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 1.2em;
    font-weight: 400; 
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.btn-primary,
a.btn-primary {
    background: #ff9f02;
    color: white !important;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.btn-primary:hover,
a.btn-primary:hover {
    background-color: #ffaf12;
}

.btn-secondary,
a.btn-secondary {
    background: #aaa;
    color: white !important;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.btn-secondary:hover,
a.btn-secondary:hover {
    background-color: #ccc;
}

.btn-warning,
a.btn-warning {
    background: #ff4800;
    color: white !important;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.btn-warning:hover,
a.btn-warning:hover {
    background-color: #ff6821;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.86em !important;
}

.btn-lg {
    padding: 10px 30px;
    font-size: 1.14em;
}

.btn-icon,
.btn-danger {
    background: none;
    border: none;
    cursor: pointer;
	/*margin-left: 10px;*/
    font-size: 1.2em;
    transition: background-color 0.2s ease;
    border-radius: 5px;
    padding: 3px;
}

.btn-icon:hover {
    background-color: #ffdead;/*rgba(205,205,155,0.7);*/
}

.btn-danger:hover {
    background-color: #fdbea5;
}

.btn-top-spacer {
	margin-top: 15px;
}

.btn-icon-img {
	width: 34px;
	height: 34px;
}

.btn-icon-img-34 {
	width: 34px;
	height: 34px;
}

.btn-icon-img-24 {
    width: 24px;
    height: 24px;
}

.right-space {
    margin-right: 10px;
}

/* Header button groups */
.header-buttons {
    display: flex;
    gap: 10px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 400;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f5f5f5;
}

.inline-img {
	display: inline;
}

#saveBarSlideout {
    width: 150px;
    height: 65px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border-radius: 0 0 10px 10px;
    float: right;
    position: fixed;
    top: 0;
    left: 50%;
    translate: -50%;
    display: flex;
    flex-direction: row;
    z-index: 9500;
    transition: top 0.4s ease-in-out;
}

#saveBarSlideout.show {
    top: 105px;
}

.save-bar {
    display: flex;
    flex-wrap: none;
    background-color: #ff9f02;
    border-radius: 0 0 10px 10px;
    width: 100%;
    height: 100%;
    justify-content: space-evenly;
    align-items: center;
    transition: opacity 0.2s ease-in-out;
}

.save-bar-btn img {
    width: 35px;
    height: 35px;
}

#pos-conf {
    display: none;
    flex-wrap: none;
    background-color: #d4f1c5;
    border-radius: 0 0 10px 10px;
    text-align: center;
    width: 100%;
    height: 100%;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px 5px 5px 5px;
    display: none;
    color: #7c9e45;
    transition: opacity 0.2s ease-in-out; 
}

#pos-conf.show {
    display: flex;
}

.expand-control {
	text-align: right;
	margin-bottom: 20px;
}

.expand-header {
    display: flex;
    align-items: center;
    /*padding: 15px 10px;*/
    background: #fafbfc;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.expand-header:hover {
    background: #f1f3f4;
}

.expand-header.expanded {
    background: #F0F8FF;/*rgba(137, 154, 120, 0.2);*/
    border-bottom: 1px solid #5f6b7a;/*rgba(137, 154, 120, 0.7);*/
}

.card-header-title.expanded {
    color: #052E34;
}

.expand-arrow {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 15px;
    background-image: url('../img/expand-arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.expand-arrow.expanded {
    transform: rotate(90deg);
}

.expand-title {
    font-size: 1.3em;
    flex: 1;
}

.expand-content {
    display: none;
    padding: 20px;
    background: white;
    width: 100%;
    /* overflow: hidden; */
}

.controls-bar {
    background: white;
    padding:10px 15px;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.control-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.control-link {
    min-width: 100px;
}

.control-label {
    font-weight: 400; 
    
    font-size: 0.9em;
}



/* Sortable Placeholder */
.sortable-placeholder {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    height: 60px;
    margin: 0.375rem 0;
}

/* Drag Handle */
.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #9ca3af;
    cursor: grab;
    flex-shrink: 0;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle i {
    font-size: 1rem;
}

.theme-row:hover .drag-handle {
    color: #6b7280;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #fff3e6;
    background: #f8f9fa;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
}

.tab-header {
    padding: 12px 40px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 300;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    /*min-width: fit-content;*/
}

.tab-header:hover {
    background: rgba(137, 154, 120, 0.1);
    color: #333;
}

.tab-header.active {
    border-bottom-color: #ff9f02;
    background: #ffdead;
}

.tab-content {
    padding: 20px;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Optional: Add scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    height: 5px;
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ff9f02;
    border-radius: 5px;
}

/* Status Indicators - Base Styles */
.status-item-header {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
}

.status-item-card {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: normal;
    flex-shrink: 0;
}

.status-button {
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-button:hover {
    transform: scale(1.2);
}

.status-button.selected {
    transform: scale(1.5);
}

/* Status Color Modifiers */
.status-green {
    background-color: #afe6bc;
    border: 1px solid #3d6e1f;
    color: #3d6e1f;
}

.status-yellow {
    background-color: #ffe79a;
    border: 1px solid #ca6e10;
    color: #ca6e10; 
}

.status-red {
    background-color: #fdbea5;
    border: 1px solid #a0132a;
    color: #a0132a; 
}

.status-undefined {
    background-color: #c5c4c4;
    border: 1px solid #6c757d;
    color: #6c757d; 
}

.status-green-circle {
    background-image: url('../img/g.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: none;
}

.status-yellow-circle {
    background-image: url('../img/y.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: none;
}

.status-red-circle {
    background-image: url('../img/r.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: none;
}

.status-undefined-circle {
    background-image: url('../img/u.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: none;
}

/* Status Button Selection Interface */
.status-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.status-item label {
    border-bottom: 1px solid #eee;
}

.status-button-group {
    display: flex;
    gap: 12px;
    align-items: center;
    
    padding-top: 8px;
    margin-bottom: 20px;
}

/* Selectable Cards (for many-to-many relationships) */
.selectable-cards-header {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Show/hide text toggles - styling only, never a JS hook.
   Every show/hide text link in the app carries this class; the class that
   triggers its behaviour is always a separate, locally-named one. */
.text-toggle {
    cursor: pointer;
    text-decoration: underline dashed;
    white-space: nowrap;
}

/* Text action links (e.g. Delete) - styling only, never a JS hook. */
.text-action {
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    text-transform: lowercase;
}

.text-action-delete {
    color: #a0132a;
}

.selectable-cards-header .text-toggle {
    font-size: 0.9em;
}

.selectable-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selectable-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selectable-card:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.selectable-card.selected {
    background: #e8eef2;
    border-color: #404852;
}

.selectable-card-name {
    flex: 1;
    font-size: 1.1em;
    
}

.selectable-card-checkmark {
    font-size: 1.29em;
    color: #28a745;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.selectable-card.selected .selectable-card-checkmark {
    opacity: 1;
}

/* Strat Projects List (display only) */
.strat-projects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.strat-project-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.strat-project-item .project-name {
    flex: 1;
    font-size: 1.1em;
    
}

/* Content Grid - Global layout for resources, strats, programs */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Card-within-card pattern - reusable classes */
.card-within-card-header {
    border-top: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.card-within-card-body {
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

/* Divided content grid - add border between columns */
.content-grid-divided > *:nth-child(2) {
    border-left: 1px solid #dee2e6;
    padding-left: 30px;
}

.projects-section-title {
    font-size: 1.2em;
    font-weight: 400; 
    
    margin: 0 0 15px 0;
}

.p-empty {
    color: #999;
    font-style: italic;
    font-size: 1.1em;
    margin: 0;
}

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

.item-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-card:hover {
    background: #fff0dc;
    border-color: #ffdead;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-card a {
    text-decoration: none;
    pointer-events: none;
}

.project-item-role {
    color: #666;
    font-size: 1.1em;
}

/* Tooltip */
.tooltip {
	position: absolute;
	background: #5ca3ff;
	color: #ffffff;
	padding: 5px;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	font-size: 1.1em;
	line-height: 1.4;
	max-width: 250px;
	z-index: 30000;
	pointer-events: none;
	white-space: normal;
	word-wrap: break-word;
}

/* Help Icon */
.help-icon {
	display: inline-flex;
    justify-content: center;
    align-items: center;
	width: 17px;
	height: 17px;
    aspect-ratio: 1 / 1;
	cursor: help;
	margin-left: 5px;
    /*background-color: #e6f5fb;*/
    background-image: url('../img/question.png');
    background-size: cover;
    background-repeat: none;
}

#editIssueForm,
#addIssueForm,
#addDecisionForm,
#editDecisionForm,
#addProjectForm,
#addResourceForm {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 30px
}

#reset-filters {
    text-decoration: underline;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#reset-filters.show {
    transform: translateX(0);
    opacity: 1;
}

.pie-chart {
    padding: 15px;
    max-width: 600px;
    max-height: 267px;
    aspect-ratio: auto;
}

#no-records-found {
    display: none;
    width: 100%;
    padding: 20px;
    background-color: #ff9f02;
    color: white;
    font-size: 1.5em;
    font-weight: 300;
}

/* Grace Period Banner */
.grace-banner {
    background-color: #fdbea5;
    color: #a0132a; 
    padding: 12px 20px;
    text-align: center;
    font-size: 1.2em;
}

.grace-banner a {
    color: red !important;
    text-decoration: underline !important;
    font-weight: 400; 
}

.grace-banner a:hover {
    color: #ffcccc;
}

/* Sandbox Banner */
.sandbox-banner {
    background-color: #afe6bc;
    color: #3d6e1f; 
    padding: 12px 20px;
    text-align: center;
    font-size: 1.2em;
}

.grace-banner a {
    color: red !important;
    text-decoration: underline !important;
    font-weight: 400; 
}

.grace-banner a:hover {
    color: #ffcccc;
}

.sandbox-banner a {
    color: #2a2a2a !important;
    text-decoration: underline !important;
    font-weight: 400; 
}

.sandbox-banner a:hover {
    color: #ff9f02 !important;
}

.sandbox-cta {
    position: fixed;
    bottom: 13px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    z-index: 10000;
    background-color: #ff9f02;
    border-radius: 50px;
    padding: 10px 25px;
    text-align: center;
    color: #ffffff;
    font-size: 1.2em;
}

.sandbox-cta a {
    text-decoration: none;
    color: yellow !important;
}

.sandbox-cta a:hover {
    color: #ffdead !important;
}

.card-spacer {
    height: 35px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header-title {
	    font-size: 1.3em;
	}

	.content-grid {
	    grid-template-columns: 1fr;
	    gap: 20px;
	}

	/* Divided content grid - switch to top border on mobile */
	.content-grid-divided > *:nth-child(2) {
	    border-left: none;
	    border-top: 1px solid #dee2e6;
	    padding-left: 0;
	    padding-top: 20px;
	}

    #pos-conf {
        padding: 10px 10px 10px 10px;
    }

	#saveBarSlideout {
	    top: -70px;
	    left: 50%;
	    translate: -50%;
	    z-index: 10000;
	}

	#saveBarSlideout.show {
	    top: 105px;
	}

    #editIssueForm,
    #addIssueForm {
        flex-direction: column;
    }
}

.yes-print {
    display: none;
}

@media print {
    @page {
        size: letter portrait;
        margin: 0.15in;
    }
    
    body, html {
        height: 10.5in;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background: none;
    }

    * {
        print-color-adjust: exact !important;
    }

    .nav-menu,
    #saveBarSlideout,
    .footer-center,
    .doing-nav,
    .no-print
     {
        display: none;
    }

    .yes-print {
        display: inline-block;
    }
    
    .header {
        background-color: #3a3f47 !important;
    }

    .tooltip {
        display: none;
    }

}