<div class="timely ai1ec-single-event
	ai1ec-event-id-{{ post_id }}
	ai1ec-event-instance-id-{{ instance_id }}
	{% if event.is_multiday %}ai1ec-multiday{% endif %}
	{% if event.is_allday %}ai1ec-allday{% endif %}">

<a id="ai1ec-event"></a>

<div class="ai1ec-actions">
	<div class="ai1ec-btn-group-vertical ai1ec-clearfix">
		{{ back_to_calendar | raw }}
	</div>

	<div class="ai1ec-btn-group-vertical ai1ec-clearfix">
		{% if ticket_url is not empty %}
			<a href="{{ ticket_url | e( 'html_attr' ) }}" target="_blank"
				class="ai1ec-tickets ai1ec-btn ai1ec-btn-sm ai1ec-btn-primary
					ai1ec-tooltip-trigger"
					title="{{ tickets_url_label | e( 'html_attr' ) }}"
					data-placement="left">
				<i class="ai1ec-fa ai1ec-fa-ticket ai1ec-fa-fw"></i>
				<span class="ai1ec-hidden-xs">
					{{ tickets_url_label }}
				</span>
			</a>
		{% endif %}
		{% if show_subscribe_buttons %}
			{% include 'subscribe-buttons.twig' with {
				'export_url':             subscribe_url,
				'export_url_no_html':     subscribe_url_no_html,
				'subscribe_label':        text_add_calendar,
				'text':                   subscribe_buttons_text,
			} %}
		{% endif %}
	</div>

	{% if extra_buttons %}
		{{ extra_buttons | raw }}
	{% endif %}
</div>

{% if map is empty %}
	{% set col1 = 'ai1ec-col-sm-3' %}
	{% set col2 = 'ai1ec-col-sm-9' %}
	<div class="ai1ec-event-details ai1ec-clearfix">
{% else %}
	{% set col1 = 'ai1ec-col-sm-4 ai1ec-col-md-5' %}
	{% set col2 = 'ai1ec-col-sm-8 ai1ec-col-md-7' %}
	<div class="ai1ec-event-details ai1ec-row">
		<div class="ai1ec-map ai1ec-col-sm-5 ai1ec-col-sm-push-7">
			{{ map | raw }}
		</div>
		<div class="ai1ec-col-sm-7 ai1ec-col-sm-pull-5">
{% endif %}

	<div class="ai1ec-time ai1ec-row">
		<div class="ai1ec-field-label {{ col1 }}">{{ text_when }}</div>
		<div class="ai1ec-field-value {{ col2 }} dt-duration">
			{{ event | timespan | raw }}
			{% if timezone_info.show_timezone %}
				{% if timezone_info.using_calendar_tz %}
					<span>{{ timezone_info.calendar_timezone }}</span>
				{% else %}
					<span>{{ timezone_info.event_timezone }}</span>
				{% endif %}
			{% endif %}
			{% include 'recurrence.twig' %}
		</div>
		<div class="ai1ec-hidden dt-start">{{ start }}</div>
		<div class="ai1ec-hidden dt-end">{{ end }}</div>
	</div>

	{% if location is not empty %}
		<div class="ai1ec-location ai1ec-row">
			<div class="ai1ec-field-label {{ col1 }}">{{ text_where }}</div>
			<div class="ai1ec-field-value {{ col2 }} p-location">
				{{ location | raw }}
			</div>
		</div>
	{% endif %}

	{% if ( cost is not empty or event.is_free ) and tickets_block is empty %}
		<div class="ai1ec-cost ai1ec-row">
			<div class="ai1ec-field-label {{ col1 }}">{{ text_cost }}</div>
			<div class="ai1ec-field-value {{ col2 }}">
				{{ event.is_free ? text_free : cost }}
			</div>
		</div>
	{% endif %}

	{% if tickets_block is not empty %}
		<div class="ai1ec-cost ai1ec-row">
			<div class="ai1ec-field-label {{ col1 }}">
				{{ text_tickets }}
			</div>
			<div class="ai1ec-field-value {{ col2 }}">
				{{ tickets_block | raw }}
			</div>
		</div>{# / .timely-cost-row #}
	{% endif %}

	{% if contact is not empty %}
		<div class="ai1ec-contact ai1ec-row">
			<div class="ai1ec-field-label {{ col1 }}">{{ text_contact }}</div>
			<div class="ai1ec-field-value {{ col2 }}">{{ contact | raw }}</div>
		</div>
	{% endif %}

	{% if categories is not empty %}
		<div class="ai1ec-categories ai1ec-row">
			<div class="ai1ec-field-label {{ col1 }} ai1ec-col-xs-1">
				<i class="ai1ec-fa ai1ec-fa-folder-open ai1ec-tooltip-trigger"
					title="{{ text_categories | e( 'html_attr' ) }}"></i>
			</div>
			<div class="ai1ec-field-value {{ col2 }} ai1ec-col-xs-10">
				{{ categories | raw }}
			</div>
		</div>
	{% endif %}

	{% if tags is not empty %}
		<div class="ai1ec-tags ai1ec-row">
			<div class="ai1ec-field-label {{ col1 }} ai1ec-col-xs-1">
				<i class="ai1ec-fa ai1ec-fa-tags ai1ec-tooltip-trigger"
					title="{{ text_tags | e( 'html_attr' ) }}"></i>
			</div>
			<div class="ai1ec-field-value {{ col2 }} ai1ec-col-xs-10">
				{{ tags | raw }}
			</div>
		</div>
	{% endif %}

	{% if filter_groups is not empty %}
		{% for filter_group in filter_groups %}
			<div class="ai1ec-categories ai1ec-row">
				<div class="ai1ec-field-label {{ col1 }} ai1ec-col-xs-1">
					<i class="ai1ec-fa {{ filter_group.icon_name }} ai1ec-tooltip-trigger"
						title="{{ filter_group.text | e( 'html_attr' ) }}"></i>
				</div>
				<div class="ai1ec-field-value {{ col2 }} ai1ec-col-xs-10">
					{{ filter_group.html_value | raw }}
				</div>
			</div>
		{% endfor %}
	{% endif %}

	{% if filter_groups is not empty %}
		{% for filter_group in filter_groups %}
			<div class="ai1ec-categories ai1ec-row">
				<div class="ai1ec-field-label {{ col1 }} ai1ec-col-xs-1">
					<i class="ai1ec-fa {{ filter_group.icon_name }} ai1ec-tooltip-trigger"
						title="{{ filter_group.text | e( 'html_attr' ) }}"></i>
				</div>
				<div class="ai1ec-field-value {{ col2 }} ai1ec-col-xs-10">
					{{ filter_group.html_value | raw }}
				</div>
			</div>
		{% endfor %}
	{% endif %}

{% if map is empty %}
	</div>{# /.ai1ec-event-details #}
{% else %}
		</div>{# /.ai1ec-col-sm-7 #}
	</div>{# /.ai1ec-event-details.ai1ec-row #}
{% endif %}

{% if not hide_featured_image %}
	{% if content_img_url is empty %}
		{{ event | avatar( [
			'post_thumbnail',
			'location_avatar',
			'category_avatar'
		], 'timely alignleft', false ) | raw }}
	{% endif %}
{% endif %}

</div>
