/* pin-lock.css */
/* কাজ: এই ফাইলটিতে পিন লক স্ক্রিন, পিন সেটআপ এবং পিন পরিবর্তনের মডালের সমস্ত স্টাইল থাকবে। */


/* মূল পিন লক স্ক্রিনের স্টাইল (Z-INDEX UPDATED) */
.pin-lock-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: none;
  
  /* আপডেট: সাধারণ মডালের উপরে কিন্তু সাইডবার (20000) ও টোস্টের (21000) নিচে */
  z-index: 19000 !important; 
}

.pin-lock-box {
  text-align: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pin-lock-header {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
}

.pin-settings-icon {
  width: 40px;
  height: 40px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pin-settings-icon i {
  font-size: 20px;
  color: #6c757d;
}

.pin-user-info {
  flex-shrink: 0;
  padding-top: 10vh;
}

.pin-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #e0e0e0;
  margin: 0 auto 10px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #aaa;
  border: 3px solid #f0f0f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  position: relative;
}

.pin-avatar-overlay-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 32px;
    height: 32px;
    background-color: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
}

.pin-avatar-overlay-icon i {
    font-size: 16px;
    color: #495057;
}

#pin-user-name {
  font-size: 22px;
  font-weight: 600;
  color: #333;
}

#pin-user-id {
  font-size: 14px;
  color: #6c757d;
}

.pin-lock-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.pin-lock-main .unlock-title {
  font-size: 18px;
  color: #555;
  margin-bottom: 20px;
  font-weight: 400;
}

/* === পিন ইনপুট ফিল্ডের জন্য স্টাইল === */
.pin-input-container {
  margin: 20px 0;
  width: 100%;
}

.native-pin-input {
  width: 100%;
  max-width: 280px; 
  margin: 0 auto;
  padding: 15px;
  font-size: 24px;
  text-align: center;
  letter-spacing: 10px; 
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f8f9fa;
  box-sizing: border-box;
}

.native-pin-input:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.native-pin-input::placeholder {
  color: #aaa;
  font-size: 16px;
  letter-spacing: normal;
}

.lock-status {
  margin-top: 15px;
  color: #dc3545;
  font-weight: bold;
  height: 20px;
  transition: opacity 0.2s;
}

.forgot-pin-link {
  margin-top: 30px;
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}

.forgot-pin-link:hover {
  text-decoration: underline;
}

.pin-lock-footer {
  padding-bottom: 5vh;
  flex-shrink: 0;
}

/* ভুল পিন দিলে ঝাঁকুনি অ্যানিমেশন */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* পিন সেটআপ এবং পরিবর্তন মডালের স্টাইল */
/* এগুলো সাধারণ মডাল, তাই z-index একটু কম থাকবে */
.modal.full-screen-modal {
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 1003;
    background-color: #fff;
}

.modal.full-screen-modal .modal-content {
    width: 100%;
    max-width: 420px;
    height: 100%;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    background-color: transparent;
    animation: none;
}

.pin-modal-header {
    display: flex;
    align-items: center;
    padding: 15px;
    flex-shrink: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pin-modal-header .back-arrow {
    font-size: 20px;
    cursor: pointer;
    margin-right: 20px;
}

.pin-modal-header h2 {
    font-size: 18px;
    font-weight: 500;
    text-align: left;
    margin: 0;
    color: #333;
}

#pin-setup-modal .pin-lock-box, #change-pin-modal .pin-lock-box {
    padding-top: 0;
}

#pin-setup-modal .pin-user-info, #change-pin-modal .pin-user-info {
    padding-top: 5vh;
}

/* === ডার্ক মোড সাপোর্ট === */
body.dark-mode .pin-lock-container,
body.dark-mode .pin-lock-box {
    background-color: #121212;
}

body.dark-mode .pin-lock-header .pin-settings-icon {
    background-color: #333;
}
body.dark-mode .pin-lock-header .pin-settings-icon i {
    color: #e0e0e0;
}

body.dark-mode .pin-avatar {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode #pin-user-name {
    color: #e0e0e0;
}

body.dark-mode .pin-lock-main .unlock-title {
    color: #bbb;
}

body.dark-mode .native-pin-input {
    background-color: #1e1e1e;
    border-color: #444;
    color: #fff;
}

body.dark-mode .native-pin-input:focus {
    border-color: #dc3545;
}

body.dark-mode .forgot-pin-link {
    color: #4dabf7;
}

body.dark-mode .modal.full-screen-modal,
body.dark-mode .pin-modal-header {
    background-color: #121212;
    color: #e0e0e0;
}
body.dark-mode .pin-modal-header h2,
body.dark-mode .pin-modal-header .back-arrow {
    color: #e0e0e0;
}