/* ===== BOTANICA v1.0.1 — phone.css ===== */

/* Auth screen */
.auth-container {
    padding: 40px 24px;
    padding-top: calc(60px + var(--safe-top));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}
.auth-logo-icon {
    font-size: 72px;
    margin-bottom: 12px;
}
.auth-logo-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: 2px;
}
.auth-logo-sub {
    font-size: 14px;
    color: var(--gray-text);
    margin-top: 6px;
}
.auth-tabs {
    display: flex;
    background: var(--gray-bg);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-text);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: #fff;
    color: var(--green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.auth-btn {
    width: 100%;
    display: block;
    margin-top: 8px;
    padding: 16px;
    font-size: 16px;
}
.auth-error {
    color: var(--red);
    font-size: 13px;
    min-height: 20px;
    padding: 4px 0;
}
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-text);
}
.auth-switch span {
    color: var(--green);
    font-weight: 600;
    cursor: pointer;
}
#screen-auth {
    padding-bottom: 0;
}
#screen-auth .form-input {
    font-size: 16px;
}
.auth-forgot {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
}
.auth-forgot span {
    color: var(--green);
    cursor: pointer;
    font-weight: 500;
}
.auth-version {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 8px;
}

/* ===== Object cards (locations, groups, plants) ===== */

.obj-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    margin: 8px 12px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    position: relative;
}
.obj-card:active {
    transform: scale(0.98);
    opacity: 0.85;
}
.obj-card-photo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
}
.obj-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.obj-card-body {
    flex: 1;
    min-width: 0;
}
.obj-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.obj-card-sub {
    font-size: 13px;
    color: var(--gray-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.obj-card-latin {
    font-size: 12px;
    color: var(--gray-text);
    font-style: italic;
    margin-top: 2px;
}
.obj-card-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.obj-icon {
    font-size: 18px;
    opacity: 0.25;
    cursor: pointer;
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: opacity 0.15s, background 0.15s;
}
.obj-icon.active {
    opacity: 1;
}
.obj-icon:active {
    background: var(--green-light);
    transform: scale(0.92);
}
.obj-icon-edit {
    font-size: 16px;
    opacity: 0.4;
}

/* Group card variant */
.obj-card-group .obj-card-photo {
    background: #EDE7F6;
    font-size: 26px;
}

/* ===== Screen: Locations ===== */

#locations-list {
    padding-top: 8px;
    padding-bottom: 20px;
}

/* ===== Screen: Plants (inside location or group) ===== */

#plants-list {
    padding-top: 8px;
    padding-bottom: 20px;
}

/* ===== Screen: Detail ===== */

.detail-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    background: var(--green-light);
    overflow: hidden;
}
.detail-carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}
.detail-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}
.detail-carousel-slide.active {
    opacity: 1;
}
.detail-carousel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
}
.detail-carousel-prev,
.detail-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.detail-carousel-prev { left: 12px; }
.detail-carousel-next { right: 12px; }
.detail-carousel-prev:active,
.detail-carousel-next:active {
    background: rgba(0,0,0,0.7);
    transform: translateY(-50%) scale(0.95);
}
.detail-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.detail-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}
.detail-carousel-dot.active {
    background: white;
}
.detail-content { padding: 20px; }
.detail-name { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.detail-section { margin-top: 24px; }
.detail-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.detail-section p { font-size: 15px; line-height: 1.6; }
.detail-note {
    background: #FFF8E1;
    padding: 14px;
    border-radius: 12px;
    border-left: 4px solid var(--yellow);
}
.detail-desc {
    background: var(--green-light);
    padding: 14px;
    border-radius: 12px;
    border-left: 4px solid var(--green);
}
.detail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #fafafa;
    border-radius: 12px;
    margin: 0 12px;
}
.detail-gallery-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
    flex-shrink: 0;
}
.detail-gallery-item.is-main {
    border-color: var(--green);
}
.detail-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.detail-gallery-star {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.detail-gallery-star.active {
    background: rgba(255,193,7,0.9);
}
.detail-gallery-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220,53,69,0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.detail-gallery-add {
    width: 72px;
    height: 72px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    color: #999;
    flex-shrink: 0;
}
.detail-gallery-add:active {
    background: #f0f0f0;
    transform: scale(0.95);
}
.detail-action-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--safe-bottom));
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 100;
}
.detail-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s, transform 0.15s;
}
.detail-action-btn:active {
    background: var(--green-light);
    transform: scale(0.95);
}
.detail-action-btn-icon {
    font-size: 24px;
}
.detail-action-btn-label {
    font-size: 11px;
    color: var(--gray-text);
    font-weight: 500;
}

/* Photo fullscreen */
.photo-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-fullscreen-wrap {
    position: relative;
    max-width: 95%;
    max-height: 90%;
}
.photo-fullscreen-wrap img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
.photo-fullscreen-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(255,255,255,0.9);
    border: none;
    color: #333;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-fullscreen-close:active {
    background: white;
    transform: scale(0.95);
}

/* ===== Catalog ===== */
.catalog-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
}
.catalog-card:active { opacity: 0.7; }
.catalog-card-name { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 2px; }
.catalog-card-latin { font-size: 13px; color: var(--gray-text); font-style: italic; margin-bottom: 4px; }
.catalog-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.catalog-card-life { font-size: 12px; color: var(--gray-text); padding: 2px 8px; background: var(--gray-bg); border-radius: 10px; }
.catalog-card-desc { font-size: 13px; color: var(--gray-text); line-height: 1.4; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Wiki plant modal */
.wiki-plant-name { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.wiki-plant-latin { font-size: 14px; color: var(--gray-text); font-style: italic; margin-bottom: 4px; }
.wiki-plant-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.wiki-plant-section { margin-top: 14px; }
.wiki-plant-section h4 { font-size: 13px; color: var(--gray-text); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.wiki-plant-section p { font-size: 14px; color: var(--dark); line-height: 1.5; }

/* Note editor */
.note-btn {
    font-size: 24px;
    background: none;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    opacity: 0.5;
    min-width: 56px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.note-btn:active {
    transform: scale(0.95);
}
.note-editor-textarea {
    width: 100%;
    min-height: 200px;
    padding: 14px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.note-editor-textarea:focus {
    outline: none;
    border-color: var(--green);
}

/* Location picker label */
.location-picker-label {
    font-size: 14px;
    color: var(--gray-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Recognition detail */
.recognition-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.recognition-detail-photo {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-bg);
}
.recognition-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.recognition-detail-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}
.recognition-detail-latin {
    font-size: 14px;
    color: var(--gray-text);
    font-style: italic;
}
.recognition-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.recognition-detail-score {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    background: var(--green-light);
    padding: 4px 10px;
    border-radius: 20px;
}
.recognition-detail-score.low {
    color: var(--yellow);
    background: #FFF8E1;
}
.recognition-detail-family {
    font-size: 13px;
    color: var(--gray-text);
    background: var(--gray-bg);
    padding: 4px 10px;
    border-radius: 20px;
}
.recognition-detail-desc {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.6;
    background: var(--green-light);
    padding: 12px;
    border-radius: 10px;
    max-height: 180px;
    overflow-y: auto;
}
.recognition-detail-buttons {
    margin-top: 6px;
}

.photo-fullscreen-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}
.photo-fullscreen-actions {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}
.photo-fullscreen-action {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-fullscreen-action:active { background: #e0e0e0; transform: scale(0.92); }
.photo-fullscreen-action-delete { background: #fff; }
.photo-fullscreen-action-delete:active { background: #e0e0e0; }
.photo-fullscreen-nav {
    background: rgba(255,255,255,0.7);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.photo-fullscreen-nav:active { background: #fff; transform: scale(0.92); }
.photo-fullscreen-close-bottom {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 32px;
    border-radius: 12px;
    cursor: pointer;
    min-height: 44px;
}
.photo-fullscreen-close-bottom:active { background: #fff; transform: translateX(-50%) scale(0.95); }
.photo-fullscreen-counter {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ===== Modal: Plant Edit ===== */
.plant-edit-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 8px;
}
.plant-edit-qty-group {
    width: 25%;
    flex-shrink: 0;
}
.plant-edit-actions {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
    align-items: flex-end;
}
.plant-edit-action-btn {
    font-size: 24px;
    background: none;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    opacity: 0.5;
    min-width: 52px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s, transform 0.15s;
}
.plant-edit-action-btn:active {
    transform: scale(0.95);
}
.plant-edit-action-btn.active {
    opacity: 1;
    border-color: var(--green);
}
