@use '../utilities/colors' as *;
@use '../utilities/mixins' as *;
@use '../components/input' as *;
@use '../components/buttons' as *;
@use '../base/merlin' as *;

.footer {
	#menu-footer {
		@include bp-down(md) {
			display: none;
		}
	}

	min-height: 300px;
	position: relative;
	padding-top: 16rem;
	background-image: $orange;
	@include bp-up(lg){
		padding-top: 28rem;
	}
	&--404 {
		padding-top: 3rem;
		background: $orange !important;
	}

	&__rrss {
		padding: 2rem;
		margin-block: 3rem;
		color: rgba($primary-color, .2);
		border: 1px solid rgba($primary-color, .2);

		.footer-title {
			font-family: var(--primary-font);
			margin-bottom: 1rem;
		}

		.rrss {
			.footer-title {
				color: $secondary-color;
			}
		}

		.twitter {
			.footer-title {
				color: var(--primary-color);
				margin-bottom: 0;
			}

			.latest-tweets {
				max-height: 200px;
				overflow-y: auto;
			}
		}
	}

	&__nav {
		.footer-logo {
			display: inline-block;

			&:hover {
				img {
					opacity: .5;
				}
			}

			img {
				max-height: 70px;
				@extend .transition;
			}
		}

		nav {
			display: grid;
			grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
			gap: 3.5rem;
			justify-content: space-between;
			justify-items: baseline;
			margin-block: 1.5rem;

			@include bp-down(lg) {
				justify-items: flex-start;
				gap: 2rem;
			}

			@include bp-down(md) {
				justify-items: stretch;
				gap: 1rem;
			}
		}

		&-list {
			border-top: 2px solid var(--primary-color);
			padding-top: 1rem;

			a,
			& {
				color: rgba($secondary-color, .88);
				@extend .medium;
				@extend .font-14;
			}

			&:not(ul) {
				display: flex;
				flex-direction: column;
				gap: 1rem;
			}

			form {
				display: flex;
				flex-direction: column;
				gap: .35rem;

				p {
					margin-bottom: .5rem;
				}

				input {
					&[type=email] {
						background-color: #FFF;
						@extend .main-input;

						&::placeholder {
							text-align: left;
							color: $text-color-light;
						}
					}

					&[type=submit] {
						@extend .button;
						@extend .button-solid;
					}
				}
			}


			&:first-child {
				display: grid;
				grid-template-rows: repeat(4, auto);
				grid-auto-flow: column;
				justify-content: space-between;
				column-gap: 2.5rem;

				@include bp-down(md) {
					grid-auto-flow: row;
				}
			}

			li {
				margin-bottom: .75rem;
				text-transform: uppercase;

				a {
					@extend .transition;

					&:hover {
						text-decoration: underline;
						opacity: .6;
					}
				}
			}
		}
	}

	&__copyright {
		background-color: lighten($primary-color, 50%);
		color: rgba($primary-color, .8);
		text-align: center;
		padding-block: .35rem;
		@extend .font-12;
	}
}
