/* Base Styles */
:root {
	--primary-color: #2c3e50;
	--secondary-color: #3498db;
	--accent-color: #e74c3c;
	--background-color: #f8f9fa;
	--text-color: #2c3e50;
	--border-radius: 8px;
	--box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	--transition: all 0.3s ease;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	background: #f0f0f0;
}

/* Layout */
#wrap.page {
	margin: 0 auto;
	padding: 60px 20px;
	max-width: 1200px;
}

/* Header */
h1, h2, h3 {
	color: var(--primary-color);
	margin-bottom: 1rem;
}

h1 {
	font-size: 2.5rem;
	font-weight: 700;
    margin-bottom: 0;
}
.camp_type{
    color: #979797;
    margin-bottom: .75rem;
    font-weight: bold;
    font-size: 20px;
}
h2 {
	font-size: 2rem;
	font-weight: 600;
}

h3 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-top: 0;
}

/* Camp Listing Items */
.listing-item {
	background: white;
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	transition: var(--transition);
}

.listing-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.main-content {
	flex: 1;
}

.details h3 {
	color: var(--primary-color);
	margin-bottom: 0.5rem;
}

.details p {
	color: #666;
	margin-bottom: 0.5rem;
}

/* Icons and Badges */
.icon_footer {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
	flex-wrap: wrap;
}

.icon_footer span {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: #f8f9fa;
	border-radius: 20px;
	font-size: 0.9rem;
}

.icon_footer i {
	font-size: 1.1rem;
}

/* Camp Type Icons */
.day_camp i {
	color: #f1c40f;
}

.overnight_camp i {
	color: #2ecc71;
}

/* Right Section */
.right-section {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 200px;
}

.session-info {
	background: #f8f9fa;
	padding: 1rem;
	border-radius: var(--border-radius);
}

.session-info p {
	margin: 0;
}

.session-info strong {
	color: var(--primary-color);
	display: block;
	margin-bottom: 0.5rem;
}

/* Buttons */
.button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background: var(--secondary-color);
	color: white !important;
	text-decoration: none;
	border-radius: var(--border-radius);
	transition: var(--transition);
	text-align: center;
}

.button:hover {
	background: #2980b9;
	transform: translateY(-1px);
}

/* Filters */
.filter {
	display: block;
	margin-bottom: 1rem;
}

select[data-filter] {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: var(--border-radius);
	background: white;
	font-size: 1rem;
	color: var(--text-color);
	transition: var(--transition);
}

select[data-filter]:focus {
	border-color: var(--secondary-color);
	outline: none;
	box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
	.listing-item {
		flex-direction: column;
		gap: 1rem;
	}

	.right-section {
		min-width: 100%;
	}

	.icon_footer {
		justify-content: center;
	}
}

/* Camp Details Page */
#camp_info {
	display: flex;
	justify-content: space-between;
	flex-direction: row;
	gap: 2rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.card_box {
	background: #ffffff;
	padding: 1.5rem;
	border-radius: 6px;
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
	border: 1px solid #e0e0e0;
	color: #2c3e50;
}

#camp_details {
	list-style-type: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 0.5rem;
}

#camp_details li {
	margin-bottom: .5rem;
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.75rem;
	background: #f8f8f8;
	border-radius: 8px;
}

#camp_details label {
	min-width: 24px;
	color: #666;
}

#camp_details .detail-label{
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#camp_details .detail-value{
    flex: 1;
}
#camp_details .detail-value .detail-title{
    font-weight: 600;
    color: rgb(102, 102, 102);
    display: block;
    line-height: 14px;
}

#camp_details span {
	flex: 1;
}

#camp_details a {
	color: inherit;
	text-decoration: none;
}

#camp_details a:hover {
	text-decoration: underline;
}

@media (max-width: 1124px) {
    #camp_info {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .card_box[style*="width:67%"],
    .card_box[style*="width:30%"] {
        width: 100% !important;
    }
}

/* References Section */
.camp-detail-section {
	background: white;
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.camp-detail-content {
	margin-top: 1rem;
}

.camp-detail-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.camp-detail-label {
	font-weight: 600;
	min-width: 120px;
}

/* Loading States */
.loading {
	opacity: 0.7;
	pointer-events: none;
}

/* Error Messages */
.error-message {
	color: var(--accent-color);
	background: #fde8e8;
	padding: 1rem;
	border-radius: var(--border-radius);
	margin-bottom: 1rem;
}

/* Success Messages */
.success-message {
	color: #2ecc71;
	background: #e8f8e8;
	padding: 1rem;
	border-radius: var(--border-radius);
	margin-bottom: 1rem;
}

#edit,
a.logout{
	float:right;
}


table{
	width: 100%;
}
th{
	vertical-align: top;
	text-align: left;
}

.delete_this{
	opacity: .5;
}
/* Form error states - sitewide */
input.error,
textarea.error,
select.error {
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.05) !important;
}
input.error:focus,
textarea.error:focus,
select.error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}
.dropzone{
	margin: 1rem 0;
	border: 2px dashed #ccc;
	border-radius: 8px;
	height: 120px;
	line-height: 120px;
	text-align: center;
	background: #f8f8f8;
	transition: all 0.3s ease;
}
.dropzone:hover {
	background: #f0f0f0;
	border-color: #999;
}
.card_box h3 {
	color: #2c3e50;
}
.card_box a {
	color: #3498db;
}
.card_box a:hover {
	color: #2980b9;
}
@media (max-width: 992px) {
    #wrap.page {
        padding: 40px 16px;
    }
    
    #camp_info {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .card_box[style*="width:67%"],
    .card_box[style*="width:30%"] {
        width: 100% !important;
    }
    
    /* Improve camp description area */
    .fr-view {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Better spacing for camp details */
    #camp_details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    #camp_details li {
        position: relative;
        padding: 0.75rem;
        background: #f8f8f8;
        border-radius: 8px;
        margin-bottom: 0;
    }
    
    #camp_details label {
        min-width: 30px;
        font-size: 1rem;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    #camp_details span {
        display: block;
        font-size: 0.95rem;
        line-height: 1.5;
        color: #2c3e50;
    }
    #camp_details li{
        flex-direction: column;
    }
    #camp_details .detail-label{
        width: 100%;
        margin-bottom: 4px;
    }
    
    /* Remove the preview text and modal behavior */
    #camp_details li::after {
        display: none;
    }
}
@media (max-width: 576px) {
	#wrap.page {
		margin: 0;
		padding: 24px 16px;
	}
	h1 {
		font-size: 1.5rem;
		margin-bottom: 0;
	}
	.card_box {
		padding: 1rem;
		margin-bottom: 1rem;
	}
	#camp_details {
		grid-template-columns: 1fr;
	}
	#camp_details li {
		padding: 0.75rem;
	}
	.button.inline {
		display: block;
		width: 100%;
		text-align: center;
		margin: 0.5rem 0;
	}
	#camp_details a,
	.button,
	select {
		min-height: 24px;
		/* display: flex;
		align-items: center; */
	}
}
input[type="text"],
textarea {
	max-width: 100%;
	box-sizing: border-box;
}
input.elastic,
select.elastic{
    background: transparent;
    border: none;
    border-bottom:1px solid gray;
    font-size: inherit;
    max-width: 100%;
}
.card_box[data-type="session"] .button{
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    padding: 0;
    margin-left: 4px;
}
textarea.elastic{
    width:100%;
    min-height:80%;
}
/* Base tooltip styles */
.tooltip-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

.tooltip-backdrop.active {
    display: block;
}

.tooltip-content {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    z-index: 1000;
    max-width: 280px;
    width: 90%;
    border: 1px solid #eee;
    animation: slideUp 0.2s ease-out;
}

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

.tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
}

.tooltip-close:hover {
    background: #e0e0e0;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
    }
    to {
        transform: translate(-50%, 0);
    }
}

/* Session Card Styling */
.card_box[data-type="session"] {
    margin-bottom: 2rem;
    position: relative;
    padding: 0;
}

.card_box[data-type="session"] .session-header {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card_box[data-type="session"] .session-header h3 {
    font-size: 1.4rem;
    margin: 0;
    color: #333;
    display: inline-block;
}

.card_box[data-type="session"] .session-header .date-range {
    color: #666;
    font-size: 1rem;
    font-weight: normal;
}

.card_box[data-type="session"] .session-header .date-range:before {
    content: "Dates:";
    display: inline-block;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 0.5rem;
}

.card_box[data-type="session"] .session-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.card_box[data-type="session"] h4 {
    font-size: 1.2rem;
    margin: 0 0 1rem;
    color: #444;
}

/* Positions Table Styling */
.card_box[data-type="session"] table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.card_box[data-type="session"] thead {
    display: none;
}

.card_box[data-type="session"] tr {
    display: block;
    margin-bottom: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.card_box[data-type="session"] tr:last-child {
    margin-bottom: 0;
}

.card_box[data-type="session"] td {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 8rem;
    min-height: 3rem;
    line-height: 1.5;
}

.card_box[data-type="session"] td:last-child {
    /*border-bottom: none;*/
    padding-left: 1rem;
    text-align: right;
}

.card_box[data-type="session"] td:before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    width: 6rem;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card_box[data-type="session"] .note {
    color: #666;
    font-style: italic;
}

.card_box[data-type="session"] .button.inline {
    margin-left: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

/* Add Position Button */
.card_box[data-type="session"] .add_position {
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.card_box[data-type="session"] .add_position:hover {
    background: #45a049;
}

/* Session Header - Flexbox layout for clean alignment */
.card_box[data-type="session"] .session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card_box[data-type="session"] .session-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card_box[data-type="session"] .session-info h3 {
    margin: 0 0 0.5rem 0;
}

.card_box[data-type="session"] .session-info .date-range {
    color: #666;
    font-size: 0.9rem;
}

/* Delete Button - Clean positioning within flexbox */
/*.card_box[data-type="session"] .delete {
    color: #666;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}
*/
/*.card_box[data-type="session"] .delete:hover {
    color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.1);
}*/

.card_box[data-type="session"] .position-header {
    display: inline-block;
    width: auto;
    padding: 0.5rem 1rem;
    border: none;
    min-height: auto;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.card_box[data-type="session"] .position-header:first-child {
    font-size: 1.4rem;
    margin-right: 0.75rem;
    background: none;
    padding: 0;
    color: #2c3e50;
    font-weight: 700;
}

.card_box[data-type="session"] .position-header:nth-child(2) {
    font-size: 1rem;
    margin-left: 0;
    margin-right: 0.75rem;
    background: #e8f4f8;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    color: #2c3e50;
}

.card_box[data-type="session"] .position-header:nth-child(2):before {
    content: "(";
}

.card_box[data-type="session"] .position-header:nth-child(2):after {
    content: "";
}

.card_box[data-type="session"] .position-header:nth-child(3) {
    font-size: 1rem;
    margin-left: 0;
    background: #e8f4f8;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    color: #2c3e50;
}

.card_box[data-type="session"] .position-header:nth-child(3):before {
    content: " - ";
}

.card_box[data-type="session"] .position-header[data-label="Needed"]:after {
    content: " Needed";
    font-weight: normal;
}

.card_box[data-type="session"] .position-header[data-label]:before {
    display: none;
}

@media (min-width: 768px) {
    .card_box[data-type="session"] table {
        display: table;
    }
    
    .card_box[data-type="session"] thead {
        display: table-header-group;
    }
    
    .card_box[data-type="session"] th {
        display: table-cell;
        background: #f5f5f5;
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        color: #444;
        border-bottom: 2px solid #e0e0e0;
    }
    
    .card_box[data-type="session"] td {
        display: table-cell;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .card_box[data-type="session"] td:before {
        display: none;
    }
    
    .card_box[data-type="session"] tr {
        display: table-row;
        margin-bottom: 0;
        background: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }
    
    .card_box[data-type="session"] .position-header {
        display: table-cell;
        width: auto;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f0f0f0;
        font-weight: normal;
        color: inherit;
        background: none;
        border-radius: 0;
        margin: 0;
    }
    
    .card_box[data-type="session"] .position-header:first-child,
    .card_box[data-type="session"] .position-header:nth-child(2),
    .card_box[data-type="session"] .position-header:nth-child(3) {
        font-size: inherit;
        background: none;
        padding: 0.75rem 1rem;
    }
    
    .card_box[data-type="session"] .position-header[data-label="Needed"]:after,
    .card_box[data-type="session"] .position-header:nth-child(2):before,
    .card_box[data-type="session"] .position-header:nth-child(2):after,
    .card_box[data-type="session"] .position-header:nth-child(3):before {
        content: none;
    }
}