/* Gnius Angkasa Custom Styles */
#newform {
	max-width: 600px;
	margin: 50px auto;
	position: relative;
}
#newform fieldset {
	border: 0 none;
	padding: 20px 30px;
	width: 95%;
	display: inline;
	position: relative;
    max-width: 600px;
}
#newform fieldset .row {
    max-width: 550px;
}

/*Hide all except first fieldset*/
#newform fieldset:not(:first-of-type) {
	display: none;
}
#newform label {
	margin-bottom: 5px;
	color: black;
	font-size: 14px;
    font-weight: bold;
}
/*inputs*/
#newform input[type="text"], #newform input[type="password"], #newform input[type="email"],  #newform textarea, #newform select {
	padding: 10px;
	border: 1px solid #0083c3;
	border-radius: 30px;
	margin-bottom: 10px;
	width: 100%;
	box-sizing: border-box;
	font-family: montserrat;
	color: #0083c3 !important;
	font-size: 13px;
}
/*buttons*/
#newform .action-button {
    background: #ffc700;
    font-weight: bold;
    color: #0083c3;
    border: 0 none;
    cursor: pointer;
    padding: 10px 20px;
    margin: 10px 5px;
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 20px;
}
#newform .action-button:hover, #newform .action-button:focus {
	box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60;
}
#newform .messageContainer {
	color: red;
	margin-bottom: 15px;
	overflow: hidden;
}

/* Progress Bar Container */
#newform .progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 25px;
    margin: 20px 0;
    height: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Progress Bar Fill */
#newform .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 25px;
    width: 25%; /* Start at step 1 (25%) */
    transition: width 0.4s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Progress Bar Animation */
#newform .progress-bar.step-1 {
    width: 25%;
}

#newform .progress-bar.step-2 {
    width: 50%;
}

#newform .progress-bar.step-3 {
    width: 75%;
}

#newform .progress-bar.step-4 {
    width: 100%;
}

/* Typeahead Container Styles */
#newform .typeahead-container {
    position: relative;
    width: 100%;
}

#newform .typeahead-container input {
    padding-right: 40px;
}

/* Select2 Custom Styles */
#newform .select2-container .select2-selection--single {
    height: 48px !important;
    border: 1px solid #0083c3 !important;
    border-radius: 30px !important;
    padding: 0 15px !important;
    background-color: white !important;
}

#newform .select2-container .select2-selection--single .select2-selection__rendered {
    color: #0083c3 !important;
    font-size: 13px !important;
    font-family: montserrat !important;
    text-align: left !important;
    line-height: 46px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#newform .select2-container .select2-selection--single .select2-selection__placeholder {
    color: #999 !important;
}

#newform .select2-container .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 15px !important;
}

#newform .select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #0083c3 transparent transparent transparent !important;
    border-width: 6px 6px 0 6px !important;
}

#newform .title-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 30px;
}

#newform .title-container img {
    max-height: 80px;
    max-width: 50px;
}

#newform .title-container h2 {
    font-size: 30px;
    margin-top: 25px;
}

/* Select2 Dropdown Styles */
.select2-container--default .select2-results__option {
    color: #333 !important;
    background-color: white !important;
    padding: 8px 15px !important;
    font-size: 13px !important;
    text-align: left !important;
}

.select2-container--default .select2-results__option--highlighted {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.select2-container--default .select2-results__option--selected {
    background-color: #e3f2fd !important;
    color: #333 !important;
}

.select2-dropdown {
    border: 1px solid #0083c3 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    color: #333 !important;
}

/* Checkbox Styles */
#newform .checkbox-container {
    display: block !important;
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 14px;
    color: #0083c3;
    float: none !important;
    text-align: left !important;
    font-weight: 500;
}

#newform .checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#newform .checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #0083c3;
    border-radius: 4px;
}

#newform .checkbox-container:hover input ~ .checkmark {
    background-color: #f0f8ff;
}

#newform .checkbox-container input:checked ~ .checkmark {
    background-color: #0083c3;
}

#newform .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

#newform .checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

#newform .checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media only screen and (max-width: 680px) {
  #newform fieldset {
    padding: 0;
  }
}

/* Cooperative Profile Dashboard Styles */
.coop-profile-container {
    max-width: 550px;
    margin: 0 auto;
    padding: 20px;
}

.coop-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 10px;
}

.coop-profile-header h1 {
    margin: 0;
}

.coop-profile-avatar {
    flex-shrink: 0;
}

.coop-profile-avatar img {
    max-width: 50px;
}

.coop-profile-greeting {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

.coop-profile-chat {
    flex-shrink: 0;
}

.coop-profile-chat img {
    max-width: 50px;
}

.coop-profile-card {
    background: linear-gradient(135deg, #0089C9 0%, #1565C0 100%);
    border-radius: 24px;
    padding: 30px;
    color: white;
    position: relative;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(30, 136, 229, 0.3);
}

.coop-profile-edit {
    position: absolute;
    top: 24px;
    right: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.coop-profile-edit:hover {
    opacity: 1;
}

.coop-profile-info {
    margin-top: 10px;
}

.coop-profile-field {
    display: flex;
    margin-bottom: 16px;
    align-items: baseline;
}

.coop-profile-field:last-child {
    margin-bottom: 0;
}

.coop-profile-label {
    font-size: 18px;
    font-weight: 400;
    margin-right: 8px;
    min-width: 140px;
    flex-shrink: 0;
}

.coop-profile-value {
    font-size: 18px;
    font-weight: 600;
    flex-grow: 1;
}

.coop-profile-value.text-yellow {
    color: #FFC700;
}

.coop-profile-download {
    text-align: center;
}


.coop-profile-download-text {
    margin-top: 15px !important;
    font-size: 14px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 260px;
    margin: 0 auto;
}

/* Download button with icon styles */
.coop-profile-download .button {
    display: inline-block;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media only screen and (max-width: 600px) {
    .coop-profile-container {
        max-width: 100%;
        padding: 0;
    }

    .coop-profile-header {
        padding: 0;
    }
    
    .coop-profile-greeting {
        font-size: 24px;
    }
    
    .coop-profile-header {
        margin-bottom: 20px;
    }
    
    .coop-profile-card {
        padding: 24px;
        margin-bottom: 20px;
    }
    
    .coop-profile-label,
    .coop-profile-value {
        font-size: 16px;
    }
    
    .coop-profile-label {
        min-width: 120px;
    }
    
    .coop-profile-btn {
        padding: 14px 40px;
        font-size: 15px;
    }
}

/* Cooperative Profile Edit Form Styles */
.coop-edit-form {
    max-width: 600px;
    margin: 0 auto;
}

.coop-edit-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.coop-edit-section {
    margin-bottom: 30px;
}

.coop-edit-section:last-child {
    margin-bottom: 0;
}

.coop-edit-section-title {
    font-size: 20px;
    font-weight: bold;
    color: #0083c3;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Reuse existing form styles but with coop-edit prefix */
.coop-edit-form .row {
    margin-bottom: 20px;
    position: relative;
    clear: both;
}

.coop-edit-form label {
    margin-bottom: 5px;
    color: black;
    font-size: 14px;
    font-weight: bold;
    display: block;
    width: 100%;
}

.coop-edit-form input[type="text"], 
.coop-edit-form input[type="password"] {
    padding: 12px 15px;
    border: 1px solid #0083c3;
    border-radius: 30px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    font-family: montserrat;
    color: #0083c3 !important;
    font-size: 14px;
}

.coop-edit-form input[type="text"]:focus, 
.coop-edit-form input[type="password"]:focus {
    outline: none;
    border-color: #005a9c;
    box-shadow: 0 0 5px rgba(0, 131, 195, 0.3);
}

.coop-readonly-field {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 30px;
    padding: 12px 15px;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
    cursor: not-allowed;
    min-height: 45px;
}

/* Help icons and tooltips - reuse from registration form */
.coop-edit-form .input-container {
    position: relative;
}

.coop-edit-form .help-icon {
    position: absolute;
    right: 15px;
    top: 35px;
    width: 20px;
    height: 20px;
    background: #0083c3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
}

.coop-edit-form .tooltip {
    position: absolute;
    right: -10px;
    top: 60px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 200px;
    font-size: 12px;
    line-height: 1.4;
}

.coop-edit-form .tooltip .arrow-box {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.coop-edit-form .messageContainer {
    color: red;
    margin-bottom: 15px;
    overflow: hidden;
    font-size: 13px;
}

/* Action buttons */
.coop-edit-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.coop-cancel-btn {
    background: #757e85;
    color: white !important;
    padding: 10px;
    border-radius: 30px;
    text-decoration: none;
    min-width: 80px;
    text-align: center;
}

.coop-cancel-btn:hover {
    background: #5a6268 !important;
    box-shadow: 0 0 0 2px white, 0 0 0 3px #5a6268 !important;
}

.coop-save-btn {
    background: #28a745 !important;
    color: white !important;
}

.coop-save-btn:hover {
    background: #218838 !important;
    box-shadow: 0 0 0 2px white, 0 0 0 3px #218838 !important;
}

/* International phone input overrides for edit form */
.coop-edit-form .iti {
    width: 100%;
}

.coop-edit-form .iti__selected-flag {
    padding: 0 0 0 8px;
}

/* Responsive design for edit form */
@media only screen and (max-width: 600px) {
    .coop-edit-card {
        padding: 20px;
        margin: 0;
    }
    
    .coop-edit-section-title {
        font-size: 18px;
    }
    
    .coop-edit-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .coop-edit-form .tooltip {
        width: 180px;
        right: -5px;
    }
}

/** Message Container **/
.message-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message-container .title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    gap: 20px;
}

.message-container .title-container img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.message-container h2 {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.message-container p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 20px 0;
    text-align: center;
}

.message-container .action-button {
    background: #ffc700;
    font-weight: bold;
    color: #0083c3;
    border: 0 none;
    cursor: pointer;
    padding: 10px 20px;
    margin: 10px 5px;
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 20px;
    display: inline-block;
    margin-top: 20px;
}

.message-container .action-button:hover, 
.message-container .action-button:focus {
    box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60;
}

/** Subject Grid **/
.subjects-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    margin: 20px 0 !important;
    width: 100% !important;
}

.subject-item {
    position: relative !important;
    width: 100% !important;
}

.subject-box {
    display: flex !important;
    padding: 20px 15px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background-color: #f9f047 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-height: 80px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.subject-box:hover {
    border-color: #4CAF50 !important;
    background-color: #e6e032 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.subject-name {
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

/* Selected state */
input[type="checkbox"]:checked + .subject-box {
    border-color: #4CAF50 !important;
    background-color: #4CAF50 !important;
    color: #fff !important;
}

input[type="checkbox"]:checked + .subject-box .subject-name {
    color: #fff !important;
    font-weight: 700 !important;
}


/* Responsive design */
@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .subjects-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}