/*
 * Personal styling for GD, separate from the designer.
 */

/* Styling for the "Back to Top" button */
.top-link-block {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1020;

  a {
    color: #fff;
    background-color: rgba(0,0,0,0.6);
    transition: background-color 0.3s ease-out;
    padding: 9px;
    border-radius: 3px;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
    text-decoration: none;
    display: inline-block;
    line-height: 15px;

    &:hover {
      background-color: rgba(0,0,0,0.9);
      color: #fff;
    }
  }
}

/* Error styling for forms */
.Wt-error {
    color: #fa5c7c;
}

/* Main template styling to ensure the footer stays at the bottom of the page */
.main-template {
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    main {
        flex: 1 1 auto;
    }
}

/* Styling for the example reports in the try-it-yourself section */
.report-list {
    display: flex;
    flex-direction: column;
    gap: 12px;

    .report-item {
        display: flex;
        flex-direction: column;
        padding: 15px 20px;
        background-color: rgba(var(--light-teal-bg-rgb), 0.1); /* Subtle light teal tint */
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        transition: all 0.3s ease;
        text-decoration: none !important;

        &:hover {
            background-color: rgba(var(--light-teal-bg-rgb), 0.25);
            border-color: var(--white);
        }

        .report-id {
            color: var(--white);
            font-size: 1.1rem;
            line-height: 1.2;
            margin-bottom: 4px;
        }

        .report-desc {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
            font-family: 'Roboto', sans-serif;
        }
    }
}

/* Styling for the example reports on the home page */
.report-anchor {
    display: block;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05); /* Very subtle white overlay */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    height: 100%;

    &:hover {
        background: rgba(var(--light-teal-bg-rgb), 0.2); /* Uses your light teal color */
        border-color: var(--white);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

        .report-detail {
            color: var(--white);
        }
    }

    .report-id {
        display: block;
        font-size: 1.2rem;
        color: var(--white);
        margin-bottom: 5px;
        letter-spacing: 1px;
    }

    .report-detail {
        display: block;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.8); /* Slightly faded white for hierarchy */
        line-height: 1.4;
    }
}

/* Primary Button (Submit) */
.btn-submit {
    background-color: var(--primary-teal);
    color: var(--white);
    border: 2px solid var(--primary-teal);
}

.btn-submit:hover {
    background-color: var(--dark-teal);
    border-color: var(--dark-teal);
    color: var(--white);
}

/* Secondary Button (Cancel) */
.btn-cancel {
    background-color: transparent;
    color: var(--primary-teal);
    border: 2px solid var(--primary-teal);
}

.btn-cancel:hover {
    background-color: rgba(12, 72, 67, 0.05); /* Very light teal tint */
    color: var(--dark-teal);
}

/* Custom Toast Styling */
.newsletter-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    background: #1a4d43; /* Your brand color */
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Publications Page Styling */
.publications-list-container {
    background-color: var(--white);
    padding: 4rem 0;
}

/* Category Headers */
.pub-category-title {
    color: var(--primary-teal);
    border-bottom: 2px solid var(--primary-teal);
    padding-bottom: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Individual Publication Style */
.pub-entry {
    background: var(--white);
    border-left: 4px solid var(--primary-teal);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 0 8px 8px 0;
    text-align: left;
}

.pub-authors {
    color: var(--light-teal);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.pub-title {
    font-weight: 700;
    color: var(--dark-teal);
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.pub-meta {
    font-style: italic;
    font-size: 0.9rem;
    color: #666;
}

/* DOI Link as a subtle button */
.pub-doi {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--primary-teal) !important;
    text-decoration: underline !important;
    font-weight: 500;
}

/* Partner logos styling */
.partners.container .gd-card {
    display: flex;
    flex-direction: column;

    /* Allow contents to grow, ensuring that the footer stays at the bottom of the card */
    .content {
        flex: 1 1 auto;
    }

    .card-img-top {
        width: 100%;
        height: 120px;
        object-fit: contain;
        padding: 1rem;
        background-color: #fff;

        &.yale {
            object-fit: cover;
        }
    }
}

/* Equalize image size for about GD page */
.about-gd-section .gd-card {
    display: flex;
    flex-direction: column;

    .p-4 {
        display: flex;
        flex-direction: column;
        flex-grow: 1;

        .btn {
            margin-top: auto; /* Push the button to the bottom of the card */
        }
    }

    .card-img-top {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
        object-fit: cover;
        border-bottom: 1px solid #eee;
    }
}
