/**
 * Dashboard Custom Styles
 * Styles for profile management, verification, and dashboard components
 */

/* Profile Image Container */
.profile-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
  cursor: pointer;
}

.edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.edit-overlay i {
  color: white;
  font-size: 24px;
}

.profile-container:hover .edit-overlay {
  opacity: 1;
}

/* Verification Focus Card Styles */
.verification-focus-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #007bff !important;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
}

.verification-phone-display {
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border: 1px solid #e9ecef;
  margin: 10px 0;
}

.verification-focus-card .btn {
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.verification-focus-card .btn-success {
  background: #28a745;
  border-color: #28a745;
}

.verification-focus-card .btn-primary {
  background: #007bff;
  border-color: #007bff;
}

.verification-focus-card .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.verification-focus-card .btn:active {
  transform: translateY(0);
}

/* Alert styling */
.verification-focus-card .alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 6px;
}

/* Spinner Styles */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

/* Button Disabled States */
button[disabled] {
  cursor: not-allowed !important;
  opacity: 0.6;
  position: relative;
}

/* Countdown button styling */
button[disabled]:has(.bx-time) {
  background: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
}

/* Red countdown text */
button[disabled] .text-danger {
  color: #dc3545 !important;
  font-weight: 600 !important;
}

/* Form Validation Styles */
.form-control.is-invalid {
  border-color: #dc3545;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Success States */
.phone-verified {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  border: 2px solid #28a745 !important;
  animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Input Field States */
input[name="phone"]:not(.verification-focus-card input) {
  background-color: white !important;
  color: #495057 !important;
  cursor: text !important;
}

/* Readonly field styling */
input[readonly].bg-light {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  cursor: not-allowed !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .verification-focus-card::before {
    font-size: 9px;
    padding: 3px 10px;
  }
  
  .verification-focus-card .btn {
    font-size: 11px;
  }
  
  .profile-container {
    width: 80px;
    height: 80px;
  }
  
  .edit-overlay i {
    font-size: 20px;
  }
}

/* Card Image with Blurry Background */
.card-img-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 0.375rem 0.375rem 0 0;
}

.card-img-blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(15px);
  z-index: 1;
}

.card-img-top {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 200px;
  max-height: 200px;
  object-fit: contain !important;
  background: transparent;
}