﻿/* ==========================================================================
   E-Cards Dashboard
   - Styles specific to dashboard + yahrzeit list/cards
   - Keeps backward compatibility with your old .yahrzeit- selectors
   ========================================================================== */


.yahrzeit-dashboard{
    font-family: var(--font);
    color: var(--globa-color);
    --yd-user-details-bg: #4d2b79;
    --yd-delete-red: #c62828;
    --yd-delete-red-dark: #a91d1d;
}

/* Headings */
.dashboard-title,
.yd-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 18px;
}
.section-title,
.yd-section-title {
    font-family: var(--font);
    font-size: var(--h2);
    line-height: var(--h2-line-height);
    font-weight: var(--h2-font-weight);
    color: var(--h2-color);
}

#yd-add-ar-modal h2,
.yahrzeit-dashboard h2,
.popup h2{
    font-family: var(--font);
    font-size: var(--h2);
    line-height: var(--h2-line-height);
    font-weight: var(--h2-font-weight);
    color: var(--h2-color);
}

.yahrzeit-dashboard h3,
.popup h3{
    font-family: var(--font);
    font-size: var(--h3);
    line-height: var(--h3-line-height);
    font-weight: var(--h3-font-weight);
    color: var(--h3-color);
    padding: 0;
    margin: 0;
}

.yd-section-head {
    display: flex;
    justify-content: space-between;
}

.yd-header-left,
.yd-header-right{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}


.yd-btn-primary, .btn-add-yahrzeit {
    padding: 10px 60px 10px 30px;
}

.yd-also-remind .yd-btn-primary:after, 
.yahrzeit-section .yd-btn-primary:after, 
.yahrzeit-section .btn-add-yahrzeit:after{
    content: "";
    width: 19px;
    height: 19px;
    display: inline-block;
    background-image: url(../img/open-icon.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}



/* Header row (button on the right) */
.yahrzeit-dashboard .yd-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 24px;
}
.yahrzeit-dashboard .btn-add-yahrzeit {
    white-space: nowrap;
}

.yahrzeit-dashboard .yd-collapse-all {
    min-height: 50px;
    padding: 10px 22px;
    border-radius: 0;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
}

.yahrzeit-dashboard .yd-collapse-all:disabled {
    opacity: 0.45;
    cursor: default;
}

/* User card (matches the mockup) */
.user-card {
    padding: 20px 30px;
    max-width: 580px;
    width: 100%;
    border-radius: 0;
    background: var(--yd-user-details-bg);
    color: #fff;
    box-sizing: border-box;
}

.user-header .btn-edit-user,
.user-header .btn-logout-user {
    height: auto;
    padding: 0;
    border: none;
    background: none;
    text-decoration: underline;
    font-family: var(--font);
    font-size: var(--field-label-size);
    line-height: var(--field-label-line-height);
    font-weight: var(--field-label-font-weight);
    color: var(--field-label-color);
}

.user-header .btn-edit-user {
    margin-right: 10px;
}

.user-info p {
    margin: 6px 0;
    font-size: 14px;
}

.yahrzeit-details .row .k,
.yahrzeit-details .row .v,
#yd-user-static .yd-k,
#yd-user-static .yd-v {
    font-family: var(--font);
    font-size: var(--field-label-size);
    line-height: var(--field-label-line-height);
    font-weight: var(--field-label-font-weight);
    color: var(--field-label-color);
}

.user-card .yd-card-tools-header,
.user-card .user-header .btn-edit-user,
.user-card .user-header .btn-logout-user,
.user-card #yd-user-static .yd-k,
.user-card #yd-user-static .yd-v {
    color: #fff;
}

.user-info {
  display: grid;
  gap: 16px;
}

.user-info-field {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}

.yd-k {
  font-weight: bold;
}

.yd-v {
  color: #555;
}

.user-section.yd-profile {
    align-items: stretch;
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 580px) minmax(220px, 1fr);
    padding-bottom: 30px;
}

.yd-dashboard-banner {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    min-height: 100%;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.yd-dashboard-banner-img {
    display: block;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    width: 100%;
}

.yd-dashboard-banner:hover {
    text-decoration: none;
}

/* "Remind me about" section */

.yahrzeit-section {
    margin-top: 28px;
}

/* Cards list */
.yahrzeit-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Yahrzeit card */
.yahrzeit-item {
    padding: 30px 30px;
    border-radius: 0;
    background: #fff;
    border: 1px solid var(--neutral-200);
    color: var(--globa-color);
}

.yahrzeit-item .yahrzeit-header h3,
.yahrzeit-item .yahrzeit-details .row .k,
.yahrzeit-item .yahrzeit-details .row .v {
    color: var(--field-label-color);
}

.yahrzeit-card-body {
    display: block;
}

.yahrzeit-summary {
    display: none;
    grid-template-columns: minmax(0, 1.35fr) minmax(90px, 0.65fr) minmax(110px, 0.85fr) 24px;
    align-items: center;
    gap: 18px;
    min-height: 42px;
    color: #000;
    cursor: pointer;
}

.yahrzeit-summary > span:not(.toggle-icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yahrzeit-summary__name {
    font-weight: 700;
}

.yahrzeit-summary__hebrew,
.yahrzeit-summary__deceased {
    font-weight: 500;
}

.yahrzeit-item.is-collapsed {
    padding-top: 16px;
    padding-bottom: 16px;
}

.yahrzeit-item.is-collapsed .yahrzeit-summary {
    display: grid;
}

.yahrzeit-item.is-collapsed .yahrzeit-card-body {
    display: none;
}

.yahrzeit-header h4 {
    margin: 0;
    font-size: 16px;
}
.yahrzeit-header {
    border-bottom: 1px dotted var(--neutral-200);
    cursor: pointer;
    margin-bottom: 15px;
    padding-bottom: 15px;
}
.yahrzeit-controls {
    display: flex;
    gap: 8px;
}
.yahrzeit-controls a,
.yahrzeit-controls button {
    height: 30px;
    padding: 0 12px;
}

.yahrzeit-controls .btn-delete-yahrzeit {
    border-color: var(--yd-delete-red);
    background: var(--yd-delete-red);
    color: #fff;
}

.yahrzeit-controls .btn-delete-yahrzeit:hover {
    border-color: var(--yd-delete-red-dark);
    background: var(--yd-delete-red-dark);
    color: #fff;
}

/* "Yahrzeit Details" table ” two columns */
.yahrzeit-details {
    display: grid;
    gap: 16px;
}
.yahrzeit-details .row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
}

@media (max-width: 700px) {
    .yahrzeit-details .row {
        grid-template-columns: 1fr;
    }
}


.toggle-icon {
    width: 19px;
    height: 19px;
    display: inline-block;
    background-image: url(../img/toggle-icon.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    position: absolute;
    right: 20px;
    transform: rotate(0deg);
    z-index: 1;
    cursor: pointer;
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-icon.open{
    transform: rotate(180deg);
}

.yahrzeit-dashboard .yahrzeit-toggle-icon {
    position: static;
    right: auto;
    flex: 0 0 19px;
    z-index: auto;
    align-self: center;
    margin-left: auto;
    transform: rotate(0deg);
}

.yahrzeit-dashboard .yahrzeit-toggle-icon.open {
    transform: rotate(180deg);
}

.yahrzeit-summary .yahrzeit-toggle-icon {
    justify-self: end;
}


.yahrzeit-item .pillbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    margin-top: 30px;
}
.pillbar .pill {
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
}
.pillbar .pill:hover {
    background: #922381;
    color: #fff;
}

/* Also Remind block */
.also-remind {
    padding-top: 30px;
    padding-bottom: 30px;
    border-top: 1px solid var(--neutral-200);
}
.also-remind-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    margin-bottom: 30px;
    margin-top: 30px;
    position: relative;
}
.also-remind-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.also-remind-header .btn-add-also-remind {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    padding: 10px 60px 10px 30px;
    border-radius: 0;
    border: 1px solid #000;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    min-height: 50px;
    position: relative;
}

.also-remind-header .btn-add-also-remind:after {
    content: "";
    width: 19px;
    height: 19px;
    display: inline-block;
    background-image: url(../img/open-icon.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.also-remind-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.also-remind-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-bottom: 1px solid var(--neutral-200);
    border-radius: 0;
    padding: 10px 12px;
}
.also-remind-item .info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
}
.also-remind-item .name {
    font-weight: 600;
}
.also-remind-item .email {
    
}
.also-remind-item .rel {
    background: #f3f4f6;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
}
.also-remind-item .actions {
    display: flex;
    gap: 8px;
}
.also-remind-item .actions .edit {
    height: 28px;
    padding: 0 10px;
}
.also-remind-item .actions .delete,
.also-remind-item .actions .js-ar-delete {
    height: 28px;
    padding: 0 10px;
    background: var(--yd-delete-red);
    border-color: var(--yd-delete-red);
    color: #fff;
}
.also-remind-item .actions .delete:hover,
.also-remind-item .actions .js-ar-delete:hover {
    background: var(--yd-delete-red-dark);
    border-color: var(--yd-delete-red-dark);
}

.also-remind-list .also-remind-item:last-child {
    border: none;
}

/* Load more */
.btn-load-more {
    display: inline-flex;
    margin: 12px auto 0;
    border-radius: 6px;
    height: 34px;
    padding: 0 14px;
    background: #111;
    color: #fff;
    border-color: #111;
}
.btn-load-more:hover {
    background: #000;
}

/* Bottom "Add another" button (matches the mockup) */
.yahrzeit-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}
.yahrzeit-actions .btn-add-yahrzeit {
    height: 36px;
}

/* Empty state */
#yd-yahrzeit-list .yd-muted {
    text-align: center;
    border: 1px dashed var(--neutral-300);
    border-radius: 0;
    padding: 30px;
    background: #fff;
}

.yd-input, 
.popup-form input[type="text"], 
.popup-form input[type="email"], 
.popup-form select, 
#user-profile-form input, 
#user-profile-form select{
    width: 100%;
    border: 1px solid #4d2b79;
    border-radius: 0;
    box-sizing: border-box;
    padding: 15px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    color: #000 !important;
    min-height: 50px;
}

.yd-also-remind {
    margin: 50px auto;
    text-align: center;
}


/* Footer */
.dashboard-footer {
    margin-top: 40px;
    background: #0f172a;
    color: #fff;
    padding: 18px;
    border-radius: 0;
    text-align: center;
}
.dashboard-footer a {
    color: #fff;
    text-decoration: underline;
}

.popup-content {
    width: min(854px, 92vw);
}

#yd-add-ar-modal,
#yd-form-add-ar,
#yd-add-ar-modal select,
#yd-form-add-ar select,
#yd-add-ar-modal label,
#yd-form-add-ar label,
#yd-add-ar-modal input,
#yd-form-add-ar input,
.popup,
.popup select,
.popup label,
.popup input{
    font-family: var(--font);
}

.popup-actions button[data-close="yd-add-ar-modal"]{
    display: none;
}


.popup #btn-confirm-yes,
.popup #btn-confirm-cancel,
.popup #close-popup,
.popup .dd-btn,
.popup .popup-actions button[type="submit"],
.btn-load-more{
    color: #fff !important;
    border-color: #000;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600 !important;
    background-color: #000;
    padding: 20px;
    cursor: pointer;
    min-width: 150px;
    margin-bottom: 0;
    margin-top: 20px;
    border: none;
    min-height: 50px;
}

.popup .popup-actions button[type="submit"]{
    margin-top: 0px;
}

.popup .popup-actions{
    justify-content: center;
}

/* Style for the dropdown */
.popup select[name="country"],
.popup select[name="edit_country"],
.popup select[name="relationship"] {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="12" height="12"%3E%3Cpath d="M0 0l6 6 6-6z" fill="%23000" /%3E%3C/svg%3E');
    appearance: none;
    background-color: white;
    background-repeat: no-repeat;
    background-position: calc(100% - 20px) 24px;
    background-size: 12px;
    border: 1px solid #4d2b79;
    border-radius: 0;
    box-sizing: border-box;
}

.popup select{

}

.popup .popup-close-btn{
    width: 30px;
    height: 30px;
    top: 15px;
    right: 15px;
    border-radius: 0px;
    background-image: url(../img/close-btn.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.popup .popup-close-btn:hover{
    background-color: transparent;
}

.popup .popup-form{
    max-width: 90%;
    margin: 35px auto;
}

.popup h2{
  text-align: center;
  margin-top: 30px;
}

#confirm-message,
#finished-message {
    padding: 20px 0;
    text-align: center;
}

.btn-load-more {
    display: flex;
}

.field-group { 
    margin-bottom: 14px; 
}
.field-error { 
    margin-top: 6px; 
    font-size: 13px; 
    line-height: 1.3; 
    color: #b91c1c; 
}
.has-error { 
    border-color: #ef4444 !important; 
}
.form-message.error { 
    color: #b91c1c; 
    display:block; 
}

.pill.is-disabled,
.pill.is-disabled:hover {
    background: #eee;
    border-color: #ddd;
    color: #ccc;
}


.ecards-user-details-form-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    margin: 0;
}

.ecards-user-details-form-row label,
.ecards-user-details-form-row input, 
.ecards-user-details-form-row select  {
    width: 100% !important;
    text-align: left;
    margin: 0px auto 10px;
    padding-right: 0;
}

#ecards-user-details-form {
    max-width: 90%;
    margin: 35px auto;
}

#ecards-user-details-form input, 
#ecards-user-details-form select{
    width: 100%;
    border: 1px solid #4d2b79;
    border-radius: 0;
    box-sizing: border-box;
    padding: 15px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    color: #000 !important;
    min-height: 50px;
    background-color: transparent;
    margin-bottom: 0px;
}

#ecards-user-details-form label {
    font-family: var(--font);
    font-size: var(--field-label-size);
    line-height: var(--field-label-line-height);
    font-weight: var(--field-label-font-weight);
    color: var(--field-label-color);
    margin: 10px 0 6px;
}

#ecards-user-details-form .yd-btn-primary, 
#ecards-user-details-form .btn-add-yahrzeit, 
#ecards-user-details-form .yd-btn-global{
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600 !important;
    padding: 20px;
    cursor: pointer;
    min-width: 150px;
    margin-bottom: 0;
    border: none;
    min-height: 50px;

}

#yd-add-ar-modal .ecards-notice.is-error {
    max-width: 90%;
    margin: auto;
}

.yd-form-add-ar-row {
    display: flex;
    justify-content: space-between;
    column-gap: 30px;
    flex-wrap: wrap;
}

.yd-form-add-ar-column {
    width: auto;
    flex: 1;
}


@media( max-width: 767px){
   #yd-root{
      padding: 10px 15px;
   }
   .user-header.yd-card-head,
   .yahrzeit-header,
   .yahrzeit-dashboard .yd-header,
   .also-remind-header{
      flex-direction: column;
      align-items: start;
   }
   .also-remind-item {
      flex-wrap: wrap;
      display: flex;
    }

    .yahrzeit-dashboard .yd-header-right {
        width: 100%;
    }

    .user-section.yd-profile {
        grid-template-columns: 1fr;
    }

    .yahrzeit-summary {
        grid-template-columns: minmax(0, 1fr) minmax(80px, 0.8fr) minmax(90px, 0.8fr) 24px;
        gap: 8px;
        font-size: 13px;
    }

    .user-card, .yahrzeit-item {
        padding-left: 15px;
        padding-right: 15px;
    }

    .pillbar .pill {
        min-width: 150px;
        text-align: center;
        padding-left: 0px;
        padding-right: 0px;
    }
}
