/**
 * Public-facing styles for ParaDB
 *
 * @package    WP_ParaDB
 * @subpackage WP_ParaDB/public/css
 */

/* Cases Listing */
.paradb-cases-listing {
	max-width: 1200px;
	margin: 0 auto;
}

.paradb-search-form {
	margin-bottom: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 4px;
}

.paradb-search-form form {
	display: flex;
	gap: 10px;
	max-width: 600px;
}

.paradb-search-form input[type="search"] {
	flex: 1;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
}

.paradb-search-form button {
	padding: 10px 20px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	transition: background 0.2s;
}

.paradb-search-form button:hover {
	background: #135e96;
}

/* Cases Grid */
.paradb-cases-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 30px;
}

.paradb-case-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	transition: box-shadow 0.3s, transform 0.2s;
}

.paradb-case-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.case-header {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.case-title {
	margin: 0 0 10px 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.case-title a {
	color: #2271b1;
	text-decoration: none;
	transition: color 0.2s;
}

.case-title a:hover {
	color: #135e96;
}

.case-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
	color: #666;
}

.case-number {
	font-weight: 600;
	color: #2271b1;
}

.case-status {
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 3px;
	text-transform: uppercase;
	font-weight: 600;
}

.case-status.open { background: #e5f5fa; color: #0073aa; }
.case-status.active { background: #ecf7ed; color: #46b450; }
.case-status.closed { background: #f9e9e9; color: #dc3232; }
.case-status.archived { background: #eee; color: #666; }

.case-content {
	margin: 15px 0;
}

.case-description {
	font-size: 14px;
	line-height: 1.6;
	color: #333;
	margin-bottom: 15px;
}

.case-phenomena {
	font-size: 13px;
	padding: 10px;
	background: #f9f9f9;
	border-left: 3px solid #2271b1;
	margin: 10px 0;
}

.case-phenomena strong {
	color: #2271b1;
}

.more-phenomena {
	color: #666;
	font-style: italic;
}

.case-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #eee;
	font-size: 13px;
}

.read-more {
	color: #2271b1;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.read-more:hover {
	color: #135e96;
}

.case-date {
	color: #666;
}

/* No Cases Message */
.paradb-no-cases {
	text-align: center;
	padding: 60px 20px;
	color: #666;
}

/* Single Case Display */
.paradb-single-case {
	max-width: 900px;
	margin: 0 auto;
	padding: 30px 0;
}

.paradb-single-case .case-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #2271b1;
}

.paradb-single-case .case-number {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	padding: 5px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 10px;
}

.paradb-single-case h1.case-title {
	margin: 10px 0;
	font-size: 32px;
	color: #333;
}

.paradb-single-case .case-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-top: 20px;
}

.meta-item {
	padding: 10px;
	background: #f9f9f9;
	border-radius: 4px;
}

.meta-item strong {
	display: block;
	color: #2271b1;
	margin-bottom: 5px;
	font-size: 12px;
	text-transform: uppercase;
}

.case-section {
	margin: 40px 0;
}

.case-section h2 {
	font-size: 24px;
	margin-bottom: 20px;
	color: #333;
	padding-bottom: 10px;
	border-bottom: 2px solid #eee;
}

.phenomena-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
	list-style: none;
	padding: 0;
	margin: 20px 0;
}

.phenomena-list li {
	padding: 10px 15px;
	background: #f9f9f9;
	border-left: 3px solid #2271b1;
	font-size: 14px;
}

.description-content {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
}

/* Reports */
.report {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 30px;
}

.report-title {
	margin: 0 0 10px 0;
	font-size: 20px;
	color: #2271b1;
}

.report-meta {
	display: flex;
	gap: 15px;
	font-size: 13px;
	color: #666;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.report-summary {
	font-style: italic;
	color: #666;
	margin-bottom: 15px;
	padding: 15px;
	background: #f9f9f9;
	border-left: 3px solid #2271b1;
}

.report-content {
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}

.report-conditions {
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
}

.report-conditions h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #2271b1;
	text-transform: uppercase;
}

.report-conditions p {
	margin: 5px 0;
	font-size: 14px;
}

/* Activities */
.activity {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 30px;
}

.activity-title {
	margin: 0 0 10px 0;
	font-size: 20px;
	color: #2271b1;
}

.activity-meta {
	display: flex;
	gap: 15px;
	font-size: 13px;
	color: #666;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.activity-content {
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}

.activity-conditions {
	margin-top: 20px;
	padding: 15px;
	background: #f0f6fb;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
}

.activity-conditions h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #2271b1;
	text-transform: uppercase;
}

.activity-conditions p {
	margin: 5px 0;
	font-size: 14px;
}

/* Evidence Grid */
.evidence-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.evidence-item {
	position: relative;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.3s;
}

.evidence-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.evidence-link {
	display: block;
	text-decoration: none;
}

.evidence-item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s;
}

.evidence-item:hover img {
	transform: scale(1.05);
}

.evidence-link.file {
	padding: 40px 20px;
	text-align: center;
	background: #f9f9f9;
}

.file-icon {
	font-size: 48px;
	display: block;
	margin-bottom: 10px;
}

.file-name {
	color: #2271b1;
	font-weight: 600;
}

.evidence-description {
	padding: 15px;
	font-size: 13px;
	color: #666;
	background: #f9f9f9;
}

/* Case Footer */
.paradb-single-case .case-footer {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 2px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	color: #666;
}

/* Witness Submission Form */
.paradb-witness-form {
	max-width: 800px;
	margin: 0 auto;
	padding: 30px 0;
}

.form-intro {
	margin-bottom: 40px;
	padding: 20px;
	background: #f9f9f9;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
}

.form-intro h2 {
	margin-top: 0;
	color: #2271b1;
}

.witness-submission-form {
	background: #fff;
	padding: 30px;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.form-section {
	border: 1px solid #eee;
	padding: 20px;
	margin-bottom: 25px;
	border-radius: 4px;
}

.form-section legend {
	font-size: 18px;
	font-weight: 600;
	color: #2271b1;
	padding: 0 10px;
}

.form-field {
	margin-bottom: 20px;
}

.form-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.form-control {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	transition: border-color 0.2s;
}

.form-control:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

textarea.form-control {
	resize: vertical;
	min-height: 150px;
	font-family: inherit;
}

.field-description {
	margin: 5px 0 0 0;
	font-size: 13px;
	color: #666;
}

.submit-field {
	margin-top: 30px;
	text-align: center;
}

.submit-button {
	padding: 12px 40px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.submit-button:hover {
	background: #135e96;
}

.form-privacy-notice {
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
	text-align: center;
}

#location-map {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 15px;
    background: #f0f0f0;
}

#map-canvas {
    width: 100%;
    height: 100%;
}

.get-current-location {
    cursor: pointer;
    padding: 0 10px;
}

/* Fix for Google Places Autocomplete dropdown visibility */
.pac-container {
    z-index: 999999 !important;
}

/* Notice Styles */
.paradb-notice {
	padding: 15px 20px;
	margin: 20px 0;
	border-left: 4px solid;
	border-radius: 4px;
}

.paradb-notice.success {
	background: #ecf7ed;
	border-left-color: #46b450;
	color: #2c6e2f;
}

.paradb-notice.error {
	background: #f9e9e9;
	border-left-color: #dc3232;
	color: #8a2424;
}

.paradb-notice p {
	margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.paradb-cases-grid {
		grid-template-columns: 1fr;
	}
	
	.paradb-search-form form {
		flex-direction: column;
	}
	
	.paradb-single-case .case-meta {
		grid-template-columns: 1fr;
	}
	
	.evidence-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
	
	.witness-submission-form {
		padding: 20px;
	}
}

/* Witness Form Styles */
.paradb-witness-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.paradb-witness-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.paradb-fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.paradb-fieldset legend {
    font-size: 1.2em;
    font-weight: bold;
    padding: 0 10px;
    color: #333;
}

.paradb-form-field {
    margin-bottom: 20px;
}

.paradb-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.paradb-form-field.required label::after {
    content: ' *';
    color: #d63638;
}

.paradb-form-field input[type="text"],
.paradb-form-field input[type="email"],
.paradb-form-field input[type="tel"],
.paradb-form-field input[type="date"],
.paradb-form-field input[type="time"],
.paradb-form-field input[type="number"],
.paradb-form-field textarea,
.paradb-form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.paradb-form-field textarea {
    resize: vertical;
}

.paradb-checkbox-label,
.paradb-radio-label {
    display: block;
    padding: 8px 0;
    font-weight: normal;
}

.paradb-checkbox-label input[type="checkbox"],
.paradb-radio-label input[type="radio"] {
    margin-right: 8px;
}

.paradb-help-text {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.paradb-privacy-policy {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.paradb-form-actions {
    text-align: center;
    margin-top: 30px;
}

.paradb-submit-button {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.paradb-submit-button:hover {
    background: #005177;
}

.paradb-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.paradb-form-messages {
    margin-bottom: 20px;
}

.paradb-message-success,
.paradb-message-error {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.paradb-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.paradb-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Conditional fields */
.paradb-conditional {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
    .paradb-witness-form-container {
        padding: 10px;
    }
    
    .paradb-witness-form {
        padding: 20px;
    }
    
    .paradb-fieldset {
        padding: 15px;
    }
}