/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/***************
 * Custom CSS  *
 ***************/

/* Parent stylesheet */
@import url("../flatsome/style.css");

/* Edições Archive Page */
.edicoes-archive-filter h4 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.edicoes-archive-filter h5 {
    margin: 15px 0 10px;
    font-size: 16px;
    font-weight: 500;
}

.archive-months {
    list-style: none;
    margin: 0 0 15px 0;
    padding: 0;
}

.archive-months li {
    margin-bottom: 5px;
}

.archive-months a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.archive-months a:hover {
    color: #000;
}

.edicao-card {
    background: #fff;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.edicao-card:hover {
    transform: none;
    box-shadow: none;
}

.edicao-thumbnail {
    position: relative;
    padding-top: 140%; /* Aspect ratio for cover images */
    overflow: hidden;
    margin: 0;
}

.edicao-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edicao-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.edicao-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.edicao-content .button {
    margin-top: auto;
    width: 100%;
    text-align: center;
}

/* Pagination */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
}

.page-numbers.current {
    background: #000;
    color: #fff;
    border-color: #000;
}

.page-numbers:hover:not(.current) {
    background: #f8f9fa;
    color: #000;
}

/* Archive Sidebar Styles */
.edicoes-archive-filter .archive-year {
    margin-bottom: 10px;
}

.edicoes-archive-filter .year-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin: 0;
    transition: background-color 0.2s ease;
}

.edicoes-archive-filter .year-toggle:hover {
    background-color: #e9e9e9;
}

.edicoes-archive-filter .toggle-icon {
    font-weight: bold;
    font-size: 16px;
}

.edicoes-archive-filter .archive-months {
    list-style: none;
    margin: 0;
    padding: 8px 0 8px 20px;
}

.edicoes-archive-filter .archive-months li {
    margin-bottom: 5px;
}

.edicoes-archive-filter .archive-months li a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.edicoes-archive-filter .archive-months li a:hover {
    color: #000;
}

/* Product Card Attributes */
.product-card-attributes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
    margin-right: 10px!important;
}

.product-attribute {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 3px;
}

.product-attribute .attribute-label {
    font-weight: 600;
    color: #333;
}

.product-attribute .attribute-value {
    color: #666;
}

/* Adjust spacing in carousel products */
.slider .product-small .product-card-attributes {
    margin-top: 8px;
    padding-top: 8px;
}

/* For smaller product cards */
.product-small .product-card-attributes {
    font-size: 11px;
}

.product-small .product-attribute {
    margin-bottom: 2px;
}

/* Hide overflow for long text */
.product-attribute .attribute-value {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* For better readability in grid view */
.products.row .product-card-attributes {
    padding: 8px;
    margin: 10px -10px -10px;
}

  .wpcf7-form input[type="file"]::after {
      content: "Sem ficheiro";
      position: absolute;
      left: 130px;
      color: #666;
  }

  .wpcf7-form input[type="file"].has-file::after {
      display: none;
  }

  .wpcf7-form .cf7-filename {
      position: absolute;
      left: 130px;
      color: #2ecc71;
  }

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/

/* Fix file input width in subscription overlay form */
.wpcf7-form-control.wpcf7-file[name="comprovativo"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* General fix for all file inputs in forms to prevent horizontal scroll */
input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Fix for overlay forms on mobile */
.mfp-content .wpcf7-form {
    max-width: 100%;
    overflow-x: hidden;
}

}