/**
 * Mobile Portal Styles
 * Responsive design for guest portal
 */

/* Reset and base styles */
.agam-mobile-portal * {
    box-sizing: border-box;
}

.agam-mobile-portal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 100%;
    margin: 0 auto;
}

/* Navigation styles */
.agam-portal-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.nav-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.guest-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guest-status.status-active {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
}

.guest-status.status-pending {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid #f1c40f;
}

.guest-status.status-expired {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.nav-item span:not(.icon) {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Portal content */
.agam-portal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.portal-view {
    padding: 20px;
}

/* Dashboard view */
.stay-summary-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.stay-summary-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.stay-summary-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.375rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stay-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.date-item {
    text-align: center;
}

.date-item .label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.date-item .value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.days-remaining {
    text-align: center;
    position: relative;
    z-index: 1;
}

.days-remaining .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.days-remaining .text {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Quick actions */
.quick-actions {
    margin-bottom: 25px;
}

.quick-actions h4 {
    margin: 0 0 15px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
}

.action-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Access codes view */
.codes-container {
    display: grid;
    gap: 20px;
}

.code-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header .icon {
    font-size: 1.25rem;
}

.card-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.card-content {
    padding: 20px;
}

.wifi-info {
    display: grid;
    gap: 15px;
}

.info-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    align-items: center;
    gap: 10px;
}

.info-item .label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.875rem;
}

.info-item .value {
    color: #2c3e50;
    word-break: break-all;
}

.password-field {
    position: relative;
}

.access-code {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    letter-spacing: 3px;
}

.copy-btn,
.toggle-password {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.copy-btn:hover,
.toggle-password:hover {
    background: #0056b3;
}

.code-note {
    text-align: center;
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* House rules */
.rules-list {
    display: grid;
    gap: 15px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.rule-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.rule-content h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.rule-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Amenities */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.amenity-icon {
    color: #28a745;
    font-weight: bold;
}

.amenity-name {
    font-size: 0.875rem;
    color: #2c3e50;
}

/* Recent updates */
.recent-updates h4 {
    margin: 0 0 15px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
}

.updates-list {
    display: grid;
    gap: 10px;
}

.update-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

.update-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.update-text {
    font-size: 0.875rem;
    color: #2c3e50;
}

.no-updates {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Login form */
.agam-mobile-login {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.login-header p {
    margin: 0;
    opacity: 0.9;
}

.mobile-login-form {
    padding: 30px 20px;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-help {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.login-help p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.login-help a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.login-help a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .agam-mobile-portal {
        padding: 10px;
    }
    
    .agam-portal-nav {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .nav-menu {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .nav-item {
        padding: 12px 8px;
    }
    
    .nav-item .icon {
        font-size: 1.25rem;
        margin-bottom: 5px;
    }
    
    .nav-item span:not(.icon) {
        font-size: 0.75rem;
    }
    
    .portal-view {
        padding: 15px;
    }
    
    .stay-summary-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .stay-dates {
        gap: 15px;
    }
    
    .action-grid {
        gap: 10px;
    }
    
    .action-btn {
        padding: 15px 10px;
    }
    
    .action-btn .icon {
        font-size: 1.25rem;
        margin-bottom: 5px;
    }
    
    .code-value {
        font-size: 1.25rem;
        padding: 12px 15px;
        letter-spacing: 2px;
    }
    
    .info-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-header h2 {
        font-size: 1.25rem;
    }
    
    .stay-summary-card h3 {
        font-size: 1.125rem;
    }
    
    .days-remaining .number {
        font-size: 2rem;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .stay-dates {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Error states */
.agam-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin: 20px 0;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Copy notification */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.copy-notification.show {
    transform: translateX(0);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .agam-mobile-portal {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .agam-portal-content {
        background: #2d2d2d;
    }
    
    .code-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .card-header {
        background: #404040;
        border-color: #505050;
    }
    
    .action-btn {
        background: #404040;
        border-color: #505050;
        color: #ffffff;
    }
    
    .action-btn:hover {
        background: #505050;
    }
}