/* main content */
#requests-list,
#certificates-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}
.request-card,
.certificate-card {
    border: 1px solid var(--grey5);
    border-radius: 8px;
    background: var(--white1);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 24px;
}

/* Each field */
.card-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.card-item-date {
    margin-left: auto;
}

/* Label style */
.card-label {
    color: var(--grey1);
}

/* Value style */
.card-value {
    color: var(--grey2);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-all;
}

/* certificates */
#certificates-modal,
#requests-modal {
    display: none;
}
.tab-title-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tab-title-wrapper .green-btn {
  background: var(--green2);
  padding: 12px 24px;
  text-transform: uppercase;
  color: var(--white1);
  border: unset;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.4s ease;
}
.tab-title-wrapper .green-btn:hover {
  cursor: pointer;
  background: var(--green4);
}

.request-modal-close,
.certificate-modal-close {
    background: unset;
    border: unset;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey2);
    transition: color 0.4s ease;
}
.request-modal-close svg,
.certificate-modal-close svg {
    height: 24px;
    width: 24px;
}
.request-modal-close:hover,
.certificate-modal-close:hover {
    color: var(--grey1);
    cursor: pointer;
}
.request-modal-header .body1,
.certificate-modal-header .body1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* dropdown */
.custom-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.custom-dropdown {
    position: relative;
    width: 100%;
    background: var(--white1);
    cursor: pointer;
    transition: border-color 0.4s ease;
}
.custom-dropdown-selected {
    padding: 13px 20px;
    color: var(--grey1);
    text-transform: uppercase;
    position: relative;
    border: 1px solid var(--grey5);
    border-radius: 5px;
    transition: border-color 0.4s ease;
}
.custom-dropdown-selected:hover {
    border-color: var(--green2);
}
.custom-dropdown-selected.selected {
    border-color: var(--green2);
    color: var(--black1);
}
/* Add the arrow as a pseudo-element */
.custom-dropdown-selected::after {
  content: '';
  position: absolute;
  right: 20px; 
  top: 50%;
  width: 13px;
  height: 7px;
  background-image: url("data:image/svg+xml;utf8,<svg width='13' height='7' viewBox='0 0 13 7' xmlns='http://www.w3.org/2000/svg'><path d='M0.834625 0H11.4796C12.2252 0 12.5979 0.911243 12.0595 1.4497L6.7577 6.75148C6.42634 7.08284 5.88788 7.08284 5.55652 6.75148L0.254744 1.4497C-0.283718 0.911243 0.0890633 0 0.834625 0Z' fill='%23919191'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  transform: translateY(-50%);
  pointer-events: none; 
  transition: transform 0.4s ease;
}
/* Rotate arrow when dropdown is open */
.custom-dropdown.open .custom-dropdown-selected::after {
  transform: translateY(-50%) rotate(180deg);
}
.custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    background: var(--white1);
    border: 1px solid var(--green2);
    border-radius: 5px;
    display: none;
    z-index: 10;
}
.custom-dropdown-option {
    padding: 13px 20px;
    color: var(--black1);
    text-transform: uppercase;
    transition: background-color 0.4s ease;
}
.custom-dropdown-option:hover {
    background: var(--grey5);
}
.custom-dropdown.open .custom-dropdown-options {
    display: block;
}
/* file input part */
.file-input-part {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
    position: relative;
}
.file-input-part input[type="file"] {
  display: none; 
}

/* Custom button */
.file-input-part label.custom-file-label {
    border: 1px solid var(--grey5);
    border-style: dashed;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--grey1);
    padding: 16px 20px;
    height: 64px;
    text-align: center;
    transition: color 0.4s ease, border-color 0.4s ease;
}
.file-input-part label.custom-file-label svg {
    height: 24px;
    width: 24px;
    min-width: 24px;
}
.file-input-part label.custom-file-label .label-text {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;

}
.file-input-part label.custom-file-label:hover {
    cursor: pointer;
    color: var(--green2);
    border-color: var(--green2);
}

.file-input-part .body6 {
    margin-top: 8px;
    color: var(--grey1);
}

/* extra-information-field */
.extra-information-field {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}
.extra-information-field textarea::placeholder {
    text-transform: uppercase;
}
.extra-information-field textarea {
    padding: 13px 20px;
    resize: none;
    border: 1px solid var(--grey5);
    border-radius: 5px;
    height: 50px;
    transition: border-color 0.4s ease;
}
.extra-information-field textarea:hover {
    border-color: var(--green2);
}
.extra-information-field textarea:focus {
    color: var(--black1);
    border-color: var(--green2);
    outline: unset;
}

/* submit button */
.request-form-actions,
.certificate-form-actions {
    margin-top: 32px;
}

/* modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}
.request-modal-content,
.certificate-modal-content {
    margin: auto;
    background: var(--white1);
    padding: 24px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    transition: padding 0.4s ease;
}
/* responsive */
@media (max-width: 1100px) {
    .request-card,
    .certificate-card {
        border: 1px solid var(--grey5);
        border-radius: 8px;
        background: var(--white1);
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 24px;
    }
    /* Each field */
    .card-item {
        gap: 8px;
    }
    .card-item:nth-child(1) {
        order: 2;
    }
    .card-item:nth-child(2) {
        order: 1;        
    }
    .card-item:nth-child(3) {
        order: 3;        
    }
    .card-item:nth-child(4) {
        order: 5;
        grid-column: span 2;

        
    }
    .card-item:nth-child(5) {
        order: 4;        
    }
    .card-item-date {
        margin-left: unset;
    }
}
@media (max-width: 768px) {
    /* modal */
    .request-modal-content,
    .certificate-modal-content {
        max-width: 100%;
        margin: auto 20px;
        padding: 16px;
    }
    .file-controller .custom-file-label {
        width: 100%;
    }
    .user-account-content .body3 {
        margin-bottom: 24px;
    }
    .file-input-part,
    .extra-information-field,
    .request-form-actions, 
    .certificate-form-actions {
        margin-top: 24px;
    }
    .tab-title-wrapper {
        flex-direction: column;
        align-items: unset;
    }
    .tab-title-wrapper .green-btn {
        width: max-content;
    }
}