

/* modal.css */
/*
 * Copyright (c) 2024 Biovisuals Private Limited
 * All rights reserved.
 */

/* 🔹 Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay */
    backdrop-filter: blur(5px); /* Smooth background blur */
    padding-top: 50px;
}

/* 🔹 Modal Content */
.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 25px;
    border-radius: 10px; /* Smooth rounded corners */
    width: 420px;
    max-width: 90%;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-in-out;
}

/* ✨ Modal Slide-In Effect */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ❌ Close Button */
.close {
    color: #888;
    float: right;
    font-size: 24px;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}

.close:hover,
.close:focus {
    color: red;
    text-decoration: none;
    cursor: pointer;
}

/* 🔹 Modal Heading */
h4 {
    font-family: 'Arial', sans-serif;
    color: #222;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

/* 📋 Export Form Layout */
#exportForm {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Space between form elements */
}

/* 📌 Labels */
label {
    font-family: 'Arial', sans-serif;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
}


#exportForm input, 
#exportForm select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    height: 42px; /* Ensure uniform height */
}

/* Fix misalignment in Safari */
/* #exportForm select {
    -webkit-appearance: none; /* Remove default styling */
    -moz-appearance: none;
    appearance: none;
} */

input:focus, select:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0px 0px 5px rgba(0, 123, 255, 0.3);
}

/* 📥 Download Button */
#exportButton {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(45deg, #ffcc00, #ff9900);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

#exportButton:hover {
    background: linear-gradient(45deg, #ff9900, #ff6600);
    transform: scale(1.03);
}

#exportButton:active {
    transform: scale(0.98);
}

/* 🔹 Responsive Design for Mobile */
@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }

    #exportForm {
        gap: 10px;
    }

    #exportButton {
        font-size: 15px;
    }
}


/* ---- Studio share modal polish (add to modal.css or share-modal.css) ---- */

/* Container specific to the Studio share modal */
#studioShareModal .modal-content {
  width: 520px;
  max-width: 92%;
  padding: 20px;
}

/* Header row */
#studioShareModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -5px 0 10px;
}
#studioShareModal .modal-title {
  font-size: 16px;
  font-weight: 700;
}
#studioShareModal .btn-close,
#studioShareModal .close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Form row: email + role + share button */
#studioShareModal .share-row {
  display: grid;
  grid-template-columns: 1fr 150px 110px;
  gap: 10px;
  align-items: center;
}

/* Inputs */
#studioShareModal .form-control,
#studioShareModal .form-select {
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
#studioShareModal .form-control:focus,
#studioShareModal .form-select:focus {
  outline: none;
  border-color: #3276c3;
  box-shadow: 0 0 0 3px rgba(50,118,195,.15);
}

/* Primary button (matches your Studio yellow) */
#studioShareModal .btn-primary {
  height: 40px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(45deg, #ffcc00, #ff9900);
  color: #111;
}
#studioShareModal .btn-primary:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}
#studioShareModal .btn-outline {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

/* Suggestions dropdown under email input */
#studioShareModal .suggest-wrap {
  position: relative;
}
#studioShareModal .suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  z-index: 1100; /* higher than other tool panels */
}
#studioShareModal .suggest-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}
#studioShareModal .suggest-item:hover {
  background: #f7f9fc;
}

/* Lists: people with access / pending invites */
#studioShareModal .list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#studioShareModal .list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}
#studioShareModal .user-meta {
  min-width: 0; /* allow truncation */
}
#studioShareModal .user-name {
  display: block;
  font-weight: 600;
  color: #222;
}
#studioShareModal .user-email {
  display: block;
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small select for role in list */
#studioShareModal .role-select {
  width: 140px;
  height: 32px;
  font-size: 13px;
  border-radius: 8px;
}

/* “badge” look for pending roles */
#studioShareModal .badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f7f7f7;
  color: #333;
}

/* Alerts */
#studioShareModal .alert {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}
#studioShareModal .alert-danger { background: #ffecec; color: #9b1c1c; border: 1px solid #ffd0d0; }
#studioShareModal .alert-success { background: #eefce8; color: #1d751d; border: 1px solid #d6f5c7; }

/* Footer */
#studioShareModal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Ensure the share modal sits above other popovers/pickers */
#studioShareModal.modal { z-index: 3000; }

/* Mobile tweaks */
@media (max-width: 520px) {
  #studioShareModal .share-row {
    grid-template-columns: 1fr;
  }
  #studioShareModal .btn-primary { height: 44px; }
}

/* Share Modal Styles */
#studioShareModalRoot .modal-backdrop{
    position:fixed; inset:0; background:rgba(0,0,0,.35);
}
#studioShareModalRoot .modal-card{
   position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
    width:min(640px,92vw); background:#fff; border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.25);
   max-height:80vh; overflow:auto;
   padding:20px 24px;
}  