/**
 * Project Selector Styles
 * Clean, professional, no icons
 */

/* ============================================================================
   Modal Backdrop
   ============================================================================ */

.project-selector-backdrop,
.create-project-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================================
   Project Selector Modal
   ============================================================================ */

.project-selector-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.project-selector-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-selector-header-content {
    flex: 1;
}

.project-selector-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.project-selector-subtitle {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #7f8c8d;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    background: #f5f5f5;
    color: #2c3e50;
}

.project-selector-body {
    padding: 24px 32px;
    flex: 1;
    overflow-y: auto;
    min-height: 400px;
}

.project-selector-footer {
    padding: 16px 32px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

/* ============================================================================
   Search
   ============================================================================ */

.project-selector-search {
    margin-bottom: 24px;
}

.project-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.project-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ============================================================================
   Projects List
   ============================================================================ */

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.project-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.project-card-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 18px 20px;
    gap: 20px;
}

.project-info {
    min-width: 0;
}

.project-name {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-address {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.project-info-label {
    font-weight: 500;
    color: #7f8c8d;
    min-width: 80px;
}

.project-info-value {
    color: #2c3e50;
}


/* ============================================================================
   Empty State & Messages
   ============================================================================ */

.empty-state,
.loading-message,
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state p:first-child,
.loading-message,
.error-message p {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 14px;
    color: #95a5a6;
}

.error-message p {
    color: #e74c3c;
}

/* ============================================================================
   Create Project Modal
   ============================================================================ */

.create-project-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

.create-project-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
}

.create-project-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.create-project-subtitle {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #7f8c8d;
}

/* ============================================================================
   Form Styles
   ============================================================================ */

.create-project-form {
    padding: 24px 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.form-label .required {
    color: #e74c3c;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #bdc3c7;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #95a5a6;
}

.form-error {
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 14px;
    margin-bottom: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-primary:active:not(:disabled) {
    background: #21618c;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover:not(:disabled) {
    background: #d5dbdb;
}

.btn-select {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-select:hover {
    background: #2980b9;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* ============================================================================
   Responsive
   ============================================================================ */

/* iPad and Tablet - Landscape & Touch Devices */
@media (max-width: 1366px) and (orientation: landscape),
       (max-width: 834px),
       (hover: none) and (pointer: coarse) {
    
    .project-card-content {
        gap: 12px;
        padding: 14px 16px;
        /* Keep horizontal layout for tablets */
    }
    
    .btn-select {
        padding: 10px 16px;
        font-size: 12px;
        letter-spacing: 0.3px;
    }
    
    .project-name {
        font-size: 15px;
        /* Keep text wrapping for tablets but maintain horizontal layout */
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    .project-address {
        font-size: 12px;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        line-height: 1.5;
    }
}

/* Small Mobile - Stack vertically */
@media (max-width: 768px) {
    .project-selector-modal,
    .create-project-modal {
        width: 95%;
        max-height: 90vh;
    }

    .project-selector-header,
    .create-project-header,
    .project-selector-body,
    .create-project-form {
        padding: 20px;
    }

    .project-selector-footer,
    .form-actions {
        padding: 16px 20px;
    }

    .project-card-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }
    
    .project-info {
        width: 100%;
    }
    
    .project-name {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        line-height: 1.4;
    }
    
    .project-address {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        word-break: break-word;
        line-height: 1.5;
    }

    .btn-select {
        width: 100%;
        padding: 12px 20px;
        font-size: 13px;
    }
}

