/* components-forms.css - consolidated form and component styles shared across PHP views */

.form-card {
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border, #e6e9ef);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(20,20,40,0.04);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary, #0f172a);
}

input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border, #e6e9ef);
  background: var(--bg-input, #fff);
  font-size: 0.95rem;
  color: var(--text-primary, #0f172a);
}

textarea { min-height: 120px; }

.btn { 
  padding: 0.6rem 1rem; 
  border-radius: 10px; 
  border: none; 
  cursor: pointer; 
}

.btn-primary { background: var(--app-primary, #667eea); color: #fff; }
.btn-secondary { background: #f3f4f6; color: var(--text-primary, #0f172a); }
.btn-danger { background: #ef4444; color: #fff; }

.status-box { 
  padding: 0.75rem 1rem; 
  border-radius: 10px; 
  background: var(--bg-tertiary, #f8fafc); 
  border: 1px solid var(--border-light, #eef2ff);
}

.icon-inline { margin-right: 0.5rem; }

/* Create Modal Form Styles */
.create-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem;
}

.create-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.create-form label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #e0e0e0;
    margin: 0;
}

.create-form input,
.create-form textarea,
.create-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #404040;
    border-radius: 6px;
    background: #1f1f1f;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.create-form input::placeholder,
.create-form textarea::placeholder {
    color: #666666;
}

.create-form input:focus,
.create-form textarea:focus,
.create-form select:focus {
    outline: none;
    border-color: #606060;
    background: #252525;
    box-shadow: 0 0 0 3px rgba(96, 96, 96, 0.15);
}

.create-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.create-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.create-form .form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #3a3a3a;
    justify-content: flex-end;
}

.create-form .form-actions .btn {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.create-form .form-actions .btn-secondary {
    background: #404040;
    color: #e0e0e0;
    border: 1px solid #505050;
}

.create-form .form-actions .btn-secondary:hover {
    background: #505050;
    border-color: #606060;
}

.create-form .form-actions .btn-primary {
    background: #606060;
    color: #ffffff;
}

.create-form .form-actions .btn-primary:hover {
    background: #707070;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .create-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #3a3a3a;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e0e0e0;
    margin: 0 0 1.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888888;
}

/* Required asterisk */
.required-asterisk {
    color: #ff6b6b;
    margin-left: 0.25rem;
}

/* Photos Grid */
.captured-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.captured-photo {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #1f1f1f;
    border: 1px solid #404040;
    transition: all 0.2s ease;
}

.captured-photo:hover {
    border-color: #606060;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.captured-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.captured-photo:hover .photo-actions {
    opacity: 1;
}

.photo-action-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #606060;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.photo-action-btn:hover {
    background: #707070;
}

.photo-action-btn.remove:hover {
    background: #ff6b6b;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #e0e0e0;
    padding: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    max-height: 40px;
    overflow: hidden;
}

.photo-caption p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add Photos Button */
.btn-outline {
    background: transparent;
    color: #e0e0e0;
    border: 2px solid #606060;
}

.btn-outline:hover {
    background: #606060;
    color: #ffffff;
    border-color: #707070;
}

