/* Interior Design Manager - Frontend Styles */

.idm-client-dashboard {
    padding: 20px 0;
}

.idm-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.idm-project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.idm-project-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.idm-project-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.idm-project-content {
    padding: 20px;
}

.idm-project-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.idm-project-status {
    color: #666;
    margin: 10px 0;
}

/* Project View */
.idm-project-view {
    padding: 20px 0;
}

.idm-project-header {
    margin-bottom: 30px;
}

.idm-project-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.idm-project-title-row h1 {
    margin: 0;
}

.idm-edit-button {
    background: #FF9800;
    color: #fff;
    border: none;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.idm-edit-button:hover {
    background: #F57C00;
    color: #fff;
}

.idm-project-meta {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    color: #666;
}

.idm-project-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Progress Bar */
.idm-progress-bar {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.idm-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.idm-progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.idm-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.idm-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.idm-step.completed .idm-step-number {
    background: #4CAF50;
    color: #fff;
}

.idm-step.active .idm-step-number {
    background: #2196F3;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
}

.idm-step-label {
    font-size: 0.9em;
    color: #666;
    max-width: 150px;
    margin: 0 auto;
}

/* Rooms Grid */
.idm-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.idm-room-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.idm-room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.idm-room-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.idm-room-content {
    padding: 15px;
}

.idm-room-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.idm-room-budget {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.idm-room-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.idm-room-actions .button {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

/* Chat */
.idm-chat-container {
    max-width: 800px;
    margin: 30px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.idm-chat-header {
    background: #2196F3;
    color: #fff;
    padding: 15px 20px;
}

.idm-chat-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.idm-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.idm-message {
    margin-bottom: 20px;
    max-width: 70%;
}

.idm-message-own {
    margin-left: auto;
    text-align: right;
}

.idm-message-other {
    margin-right: auto;
}

.idm-message-author {
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 5px;
    color: #666;
}

.idm-message-content {
    background: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    display: inline-block;
    text-align: left;
}

.idm-message-own .idm-message-content {
    background: #2196F3;
    color: #fff;
}

.idm-message-image {
    margin-top: 10px;
    display: inline-block;
}

.idm-message-image img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.idm-message-image img:hover {
    transform: scale(1.02);
}

.idm-message-time {
    font-size: 0.75em;
    color: #999;
    margin-top: 5px;
}

.idm-no-messages {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.idm-chat-input {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.idm-chat-input form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.idm-chat-input textarea {
    width: 100%;
    resize: none;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.idm-chat-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.idm-chat-file-upload label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.idm-chat-file-upload .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

#idm-chat-filename {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.idm-chat-input button {
    align-self: flex-end;
    white-space: nowrap;
}

/* Designer Dashboard */
.idm-designer-dashboard {
    padding: 20px 0;
}

.idm-designer-dashboard table {
    margin-top: 20px;
}

.idm-designer-dashboard .button-small {
    padding: 4px 8px;
    font-size: 0.9em;
    margin-right: 5px;
}

/* Shopping List */
.idm-shopping-list {
    margin: 30px 0;
}

.idm-shopping-list-header {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #90caf9;
}

.idm-shopping-list-items {
    border: 1px solid #e0e0e0;
    border-top: none;
}

.idm-shopping-item {
    display: grid;
    grid-template-columns: 100px 1fr 150px 120px 100px;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

.idm-shopping-item:last-child {
    border-bottom: none;
}

.idm-item-photo img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.idm-item-details h4 {
    margin: 0 0 10px 0;
}

.idm-item-description {
    color: #666;
    font-size: 0.9em;
}

.idm-item-dimensions {
    color: #999;
    font-size: 0.85em;
}

.idm-item-price {
    text-align: right;
}

.idm-item-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
}

.idm-item-price-estimated {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1em;
}

.idm-item-actions {
    text-align: center;
}

/* Frontend Forms */
.idm-create-project-form,
.idm-add-room-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.idm-create-project-form h2,
.idm-add-room-form h2 {
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #2196F3;
}

.idm-form-section {
    margin-bottom: 30px;
}

.idm-form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2em;
}

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

.idm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.idm-form-group .required {
    color: #f44336;
}

.idm-form-group input[type="text"],
.idm-form-group input[type="url"],
.idm-form-group input[type="email"],
.idm-form-group select,
.idm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.idm-form-group input[type="text"]:focus,
.idm-form-group input[type="url"]:focus,
.idm-form-group input[type="email"]:focus,
.idm-form-group select:focus,
.idm-form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.idm-form-group input[type="file"] {
    padding: 8px 0;
}

.idm-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.idm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.idm-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    align-items: center;
}

.idm-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.idm-form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.idm-form-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.idm-form-message.loading {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #64b5f6;
}

/* Room Items in Form */
.idm-rooms-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.idm-rooms-section > p {
    color: #666;
    margin-bottom: 20px;
}

#idm-rooms-container {
    margin-bottom: 20px;
}

.idm-room-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    position: relative;
}

.idm-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.idm-room-header h4 {
    margin: 0;
    color: #2196F3;
    font-size: 1.1em;
}

.idm-remove-room {
    background: none;
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
    padding: 0;
}

.idm-remove-room:hover {
    color: #d32f2f;
}

#idm-add-room-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

#idm-add-room-btn:hover {
    background: #388E3C;
}

/* Button in dashboard to create project */
.idm-create-project-button {
    display: inline-block;
    margin: 20px 0;
    padding: 15px 30px;
    background: #2196F3;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.idm-create-project-button:hover {
    background: #1976D2;
    color: #fff;
}

.idm-add-room-button {
    display: inline-block;
    margin: 15px 0;
    padding: 12px 25px;
    background: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.idm-add-room-button:hover {
    background: #388E3C;
    color: #fff;
}

/* Access Denied */
.idm-access-denied {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.idm-access-denied h1 {
    color: #f44336;
    margin-bottom: 20px;
}

.idm-access-denied p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.idm-access-denied .button {
    background: #2196F3;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

.idm-access-denied .button:hover {
    background: #1976D2;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .idm-projects-grid,
    .idm-rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .idm-progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .idm-progress-steps::before {
        display: none;
    }
    
    .idm-shopping-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .idm-message {
        max-width: 85%;
    }
    
    .idm-form-row {
        grid-template-columns: 1fr;
    }
    
    .idm-create-project-form,
    .idm-add-room-form {
        padding: 20px;
    }
    
    .idm-form-actions {
        flex-direction: column;
    }
    
    .idm-form-actions .button {
        width: 100%;
    }
}
